2012-01-29 13:36:33 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2015-11-03 13:53:50 +00:00
|
|
|
* Checkout shipping information form
|
2012-08-14 18:05:45 +00:00
|
|
|
*
|
2015-11-03 13:31:20 +00:00
|
|
|
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-shipping.php.
|
2015-10-01 14:07:20 +00:00
|
|
|
*
|
2016-02-12 11:28:41 +00:00
|
|
|
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
|
|
|
* (the theme developer) will need to copy the new files to your theme to
|
|
|
|
* maintain compatibility. We try to do this as little as possible, but it does
|
|
|
|
* happen. When this occurs the version of the template file will be bumped and
|
|
|
|
* the readme will list any important changes.
|
2015-10-01 14:07:20 +00:00
|
|
|
*
|
2016-07-19 10:30:31 +00:00
|
|
|
* @see https://docs.woocommerce.com/document/template-structure/
|
2015-10-28 18:03:24 +00:00
|
|
|
* @author WooThemes
|
|
|
|
* @package WooCommerce/Templates
|
2017-06-20 14:49:02 +00:00
|
|
|
* @version 3.0.9
|
2012-01-29 13:36:33 +00:00
|
|
|
*/
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2014-09-22 16:31:03 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit; // Exit if accessed directly
|
|
|
|
}
|
|
|
|
|
2012-01-29 13:36:33 +00:00
|
|
|
?>
|
2014-02-13 10:22:21 +00:00
|
|
|
<div class="woocommerce-shipping-fields">
|
2015-11-15 02:35:29 +00:00
|
|
|
<?php if ( true === WC()->cart->needs_shipping_address() ) : ?>
|
2012-04-21 18:30:37 +00:00
|
|
|
|
2014-02-13 10:22:21 +00:00
|
|
|
<h3 id="ship-to-different-address">
|
2017-01-13 17:26:09 +00:00
|
|
|
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
|
|
|
|
<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 _e( 'Ship to a different address?', 'woocommerce' ); ?></span>
|
2016-11-10 00:41:14 +00:00
|
|
|
</label>
|
2014-02-13 10:22:21 +00:00
|
|
|
</h3>
|
2012-01-29 13:36:33 +00:00
|
|
|
|
2014-02-13 10:22:21 +00:00
|
|
|
<div class="shipping_address">
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2014-02-13 10:22:21 +00:00
|
|
|
<?php do_action( 'woocommerce_before_checkout_shipping_form', $checkout ); ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2017-03-02 15:08:02 +00:00
|
|
|
<div class="woocommerce-shipping-fields__field-wrapper">
|
2017-06-16 10:45:53 +00:00
|
|
|
<?php
|
|
|
|
$fields = $checkout->get_checkout_fields( 'shipping' );
|
|
|
|
|
|
|
|
foreach ( $fields as $key => $field ) {
|
|
|
|
if ( isset( $field['country_field'], $fields[ $field['country_field'] ] ) ) {
|
|
|
|
$field['country'] = $checkout->get_value( $field['country_field'] );
|
|
|
|
}
|
|
|
|
woocommerce_form_field( $key, $field, $checkout->get_value( $key ) );
|
|
|
|
}
|
|
|
|
?>
|
2017-03-02 15:08:02 +00:00
|
|
|
</div>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2014-02-13 10:22:21 +00:00
|
|
|
<?php do_action( 'woocommerce_after_checkout_shipping_form', $checkout ); ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2014-02-13 10:22:21 +00:00
|
|
|
</div>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2014-02-13 10:22:21 +00:00
|
|
|
<?php endif; ?>
|
2017-03-02 15:08:02 +00:00
|
|
|
</div>
|
|
|
|
<div class="woocommerce-additional-fields">
|
2014-02-13 10:22:21 +00:00
|
|
|
<?php do_action( 'woocommerce_before_order_notes', $checkout ); ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2017-05-02 10:43:06 +00:00
|
|
|
<?php if ( apply_filters( 'woocommerce_enable_order_notes_field', 'yes' === get_option( 'woocommerce_enable_order_comments', 'yes' ) ) ) : ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2015-10-28 18:03:24 +00:00
|
|
|
<?php if ( ! WC()->cart->needs_shipping() || wc_ship_to_billing_address_only() ) : ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2016-10-12 10:16:30 +00:00
|
|
|
<h3><?php _e( 'Additional information', 'woocommerce' ); ?></h3>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2014-02-13 10:22:21 +00:00
|
|
|
<?php endif; ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2017-03-02 15:08:02 +00:00
|
|
|
<div class="woocommerce-additional-fields__field-wrapper">
|
2017-06-16 10:45:53 +00:00
|
|
|
<?php foreach ( $checkout->get_checkout_fields( 'order' ) as $key => $field ) : ?>
|
2017-03-02 15:08:02 +00:00
|
|
|
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2014-02-13 10:22:21 +00:00
|
|
|
<?php endif; ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2014-02-13 10:22:21 +00:00
|
|
|
<?php do_action( 'woocommerce_after_order_notes', $checkout ); ?>
|
2014-03-28 02:27:24 +00:00
|
|
|
</div>
|