| 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 |
|
| 22 |
<?php |
| 23 |
do_action( 'woocommerce_before_checkout_shipping_fields', $checkout ); |
| 24 |
?> |
| 25 |
<div class="woocommerce-shipping-fields"> |
| 26 |
<?php if ( true === WC()->cart->needs_shipping_address() ) : ?> |
| 27 |
|
| 28 |
<h3 id="ship-to-different-address"> |
| 29 |
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox"> |
| 30 |
<input id="ship-to-different-address-checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" <?php checked( apply_filters( 'woocommerce_ship_to_different_address_checked', 'shipping' === get_option( 'woocommerce_ship_to_destination' ) ? 1 : 0 ), 1 ); ?> type="checkbox" name="ship_to_different_address" value="1" /> <span><?php echo wp_kses_post( apply_filters( 'cartflows_woo_shipping_text', esc_html__( 'Ship to a different address?', 'woocommerce' ) ) ); ?></span> |
| 31 |
</label> |
| 32 |
</h3> |
| 33 |
|
| 34 |
<div class="shipping_address"> |
| 35 |
|
| 36 |
<?php do_action( 'woocommerce_before_checkout_shipping_form', $checkout ); ?> |
| 37 |
|
| 38 |
<div class="woocommerce-shipping-fields__field-wrapper"> |
| 39 |
<?php |
| 40 |
$fields = $checkout->get_checkout_fields( 'shipping' ); |
| 41 |
|
| 42 |
foreach ( $fields as $key => $field ) { |
| 43 |
woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); |
| 44 |
} |
| 45 |
?> |
| 46 |
</div> |
| 47 |
|
| 48 |
<?php do_action( 'woocommerce_after_checkout_shipping_form', $checkout ); ?> |
| 49 |
|
| 50 |
</div> |
| 51 |
|
| 52 |
<?php endif; ?> |
| 53 |
</div> |
| 54 |
<div class="woocommerce-additional-fields"> |
| 55 |
<?php do_action( 'woocommerce_before_order_notes', $checkout ); ?> |
| 56 |
|
| 57 |
<?php if ( apply_filters( 'woocommerce_enable_order_notes_field', 'yes' === get_option( 'woocommerce_enable_order_comments', 'yes' ) ) ) : ?> |
| 58 |
|
| 59 |
<?php if ( ! WC()->cart->needs_shipping() || wc_ship_to_billing_address_only() ) : ?> |
| 60 |
|
| 61 |
<h3><?php esc_html_e( 'Additional information', 'woocommerce' ); ?></h3> |
| 62 |
|
| 63 |
<?php endif; ?> |
| 64 |
|
| 65 |
<div class="woocommerce-additional-fields__field-wrapper"> |
| 66 |
<?php foreach ( $checkout->get_checkout_fields( 'order' ) as $key => $field ) : ?> |
| 67 |
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?> |
| 68 |
<?php endforeach; ?> |
| 69 |
</div> |
| 70 |
|
| 71 |
<?php endif; ?> |
| 72 |
|
| 73 |
<?php do_action( 'woocommerce_after_order_notes', $checkout ); ?> |
| 74 |
</div> |
| 75 |
|