default.php
44 lines
| 1 | <?php |
| 2 | /** |
| 3 | * This template will overwrite the WooCommerce file: woocommerce/templates/checkout/form-shipping.php. |
| 4 | */ |
| 5 | |
| 6 | defined('ABSPATH') || exit; |
| 7 | |
| 8 | if(is_checkout() || get_post_type() == \ShopEngine\Core\Template_Cpt::TYPE) { |
| 9 | |
| 10 | $checkout = WC()->checkout(); |
| 11 | |
| 12 | if(!empty($checkout->checkout_fields)) { ?> |
| 13 | |
| 14 | |
| 15 | <div class="shopengine-checkout-form-additional"> |
| 16 | |
| 17 | <div class="woocommerce-additional-fields"> |
| 18 | <?php do_action('woocommerce_before_order_notes', $checkout); ?> |
| 19 | |
| 20 | <?php if(apply_filters('woocommerce_enable_order_notes_field', 'yes' === get_option('woocommerce_enable_order_comments', 'yes'))) : ?> |
| 21 | |
| 22 | <?php if(!empty(WC()->cart) && (!WC()->cart->needs_shipping() || wc_ship_to_billing_address_only())) : ?> |
| 23 | |
| 24 | <h3><?php esc_html_e('Additional information', 'shopengine'); ?></h3> |
| 25 | |
| 26 | <?php endif; ?> |
| 27 | |
| 28 | <div class="woocommerce-additional-fields__field-wrapper"> |
| 29 | <?php foreach($checkout->get_checkout_fields('order') as $key => $field) : ?> |
| 30 | <?php woocommerce_form_field($key, $field, $checkout->get_value($key)); ?> |
| 31 | <?php endforeach; ?> |
| 32 | </div> |
| 33 | |
| 34 | <?php endif; ?> |
| 35 | |
| 36 | <?php do_action('woocommerce_after_order_notes', $checkout); ?> |
| 37 | </div> |
| 38 | |
| 39 | </div> |
| 40 | |
| 41 | <?php |
| 42 | } |
| 43 | } |
| 44 |