| 1 |
<?php |
| 2 |
/** |
| 3 |
* Checkout shipping information form |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-shipping.php. |
| 6 |
* |
| 7 |
* HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 |
* (the theme developer) will need to copy the new files to your theme to |
| 9 |
* maintain compatibility. We try to do this as little as possible, but it does |
| 10 |
* happen. When this occurs the version of the template file will be bumped and |
| 11 |
* the readme will list any important changes. |
| 12 |
* |
| 13 |
* @see https://docs.woocommerce.com/document/template-structure/ |
| 14 |
* @package WooCommerce\Templates |
| 15 |
* @version 3.6.0 |
| 16 |
* @global WC_Checkout $checkout |
| 17 |
*/ |
| 18 |
|
| 19 |
defined( 'ABSPATH' ) || exit; |
| 20 |
|
| 21 |
$show_title = apply_filters( 'sellkit-checkout-disable-shipping-fields-title', true ); |
| 22 |
|
| 23 |
$shipping_destination = get_option( 'woocommerce_ship_to_destination', true ); |
| 24 |
$section_title = esc_html__( 'Shipping address', 'sellkit' ); |
| 25 |
|
| 26 |
if ( 'billing_only' === $shipping_destination ) { |
| 27 |
$section_title = esc_html__( 'Billing & Shipping', 'sellkit' ); |
| 28 |
} |
| 29 |
|
| 30 |
if ( WC()->cart->needs_shipping() ) : ?> |
| 31 |
<div class="woocommerce-shipping-fields sellkit-one-page-checkout-shipping sellkit-checkout-local-fields"> |
| 32 |
|
| 33 |
<div class="shipping_address"> |
| 34 |
<?php if ( true === $show_title ) : ?> |
| 35 |
<h4 id="shipping_text_title" class="header heading" style="width:100%"> |
| 36 |
<?php echo $section_title; ?> |
| 37 |
</h4> |
| 38 |
<?php endif; ?> |
| 39 |
|
| 40 |
<div id="ship-to-different-address"> |
| 41 |
<input id="ship-to-different-address-checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" type="checkbox" name="ship_to_different_address" value="1" checked/> |
| 42 |
</div> |
| 43 |
|
| 44 |
<?php do_action( 'woocommerce_before_checkout_shipping_form', $checkout ); ?> |
| 45 |
|
| 46 |
<div class="woocommerce-shipping-fields__field-wrapper" id="sellkit-checkout-widget-shipping-fields"> |
| 47 |
<?php |
| 48 |
$fields = $checkout->get_checkout_fields( 'shipping' ); |
| 49 |
|
| 50 |
do_action( 'sellkit_checkout_shipping_fields', $fields, $checkout ); |
| 51 |
?> |
| 52 |
</div> |
| 53 |
|
| 54 |
<?php do_action( 'woocommerce_after_checkout_shipping_form', $checkout ); ?> |
| 55 |
</div> |
| 56 |
</div> |
| 57 |
<?php endif; ?> |
| 58 |
<div class="sellkit-woocommerce-additional-fields"> |
| 59 |
<?php do_action( 'woocommerce_before_order_notes', $checkout ); ?> |
| 60 |
<?php do_action( 'woocommerce_after_order_notes', $checkout ); ?> |
| 61 |
</div> |
| 62 |
<?php do_action( 'sellkit_checkout_after_shipping_section' ); ?> |
| 63 |
|