| 1 |
<?php |
| 2 |
/** |
| 3 |
* Checkout billing information form |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-billing.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 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- WooCommerce/Elementor template; variables mirror core docs. |
| 21 |
|
| 22 |
|
| 23 |
$shipping_destination = get_option( 'woocommerce_ship_to_destination', true ); |
| 24 |
|
| 25 |
?> |
| 26 |
<div class="woocommerce-billing-fields sellkit-one-page-checkout-billing sellkit-checkout-local-fields"> |
| 27 |
<div class="sellkit-one-page-checkout-billing-header heading"> |
| 28 |
<?php esc_html_e( 'Billing details', 'sellkit' ); ?> |
| 29 |
</div> |
| 30 |
<p class="billing-desc sub-heading"> |
| 31 |
<?php |
| 32 |
$sk_select_address_text = apply_filters( 'sellkit_checkout_block_select_address_text', esc_html__( 'Select the address that matches your card or payment method.', 'sellkit' ) ); |
| 33 |
echo wp_kses_post( $sk_select_address_text ); |
| 34 |
?> |
| 35 |
</p> |
| 36 |
<?php do_action( 'woocommerce_before_checkout_billing_form', $checkout ); ?> |
| 37 |
|
| 38 |
<?php if ( ! empty( WC()->cart ) && WC()->cart->needs_shipping() && 'billing_only' !== $shipping_destination ) : // Display this section just if we need to ship products. ?> |
| 39 |
|
| 40 |
<div class="billing-method" > |
| 41 |
<div> |
| 42 |
<label class="wrp method-a"> |
| 43 |
<input type="radio" value="same" name="billing-method" class="sellkit-billing-method-a" > |
| 44 |
<span class="checkmark"></span> |
| 45 |
<span class="labels"><?php echo esc_html__( 'Same as shipping address', 'sellkit' ); ?></span> |
| 46 |
</label> |
| 47 |
</div> |
| 48 |
<hr> |
| 49 |
<div> |
| 50 |
<label class="wrp method-b"> |
| 51 |
<input type="radio" value="diff" name="billing-method" class="sellkit-billing-method-b" <?php checked( true ); ?> > |
| 52 |
<span class="checkmark"></span> |
| 53 |
<span class="labels"><?php echo esc_html__( 'Use a different billing address', 'sellkit' ); ?></span> |
| 54 |
</label> |
| 55 |
</div> |
| 56 |
</div> |
| 57 |
|
| 58 |
<?php endif; ?> |
| 59 |
|
| 60 |
<div class="woocommerce-billing-fields__field-wrapper" id="sellkit-checkout-billing-field-wrapper"> |
| 61 |
<?php |
| 62 |
$fields = $checkout->get_checkout_fields( 'billing' ); |
| 63 |
|
| 64 |
do_action( 'sellkit_block_checkout_billing_fields', $fields, $checkout ); |
| 65 |
?> |
| 66 |
</div> |
| 67 |
|
| 68 |
<?php do_action( 'woocommerce_after_checkout_billing_form', $checkout ); ?> |
| 69 |
</div> |
| 70 |
|