PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 1.6.2
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v1.6.2
2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 All 43 releases
sellkit / includes / elementor / modules / checkout / templates / form-billing.php

form-billing.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster 1.6.2, at includes/elementor/modules/checkout/templates/form-billing.php

83 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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
21 // It can be shipping, billing and billing_only.
22 $shipping_destination = get_option( 'woocommerce_ship_to_destination', true );
23
24 $is_billing = 'billing' === $shipping_destination;
25 $is_billing_only = 'billing_only' === $shipping_destination;
26 $hide_form_class = '';
27
28 if ( $is_billing_only ) {
29 $hide_form_class = 'sellkit-hide-form-billing';
30 }
31 ?>
32 <div class="woocommerce-billing-fields sellkit-one-page-checkout-billing sellkit-checkout-local-fields <?php echo $hide_form_class; ?>">
33 <h4 class="sellkit-one-page-checkout-billing-header heading">
34 <?php esc_html_e( 'Billing details', 'woocommerce' ); ?>
35 </h4>
36 <p class="billing-desc sub-heading">
37 <?php echo apply_filters( 'sellkit_core/widgets/checkout/custom_message/select_address_text', __( 'Select the address that matches your card or payment method.', 'sellkit' ) ); ?>
38 </p>
39 <?php do_action( 'woocommerce_before_checkout_billing_form', $checkout ); ?>
40
41 <?php if ( WC()->cart->needs_shipping() ) : // Display this section just if we need to ship products. ?>
42
43 <div class="billing-method" >
44 <div>
45 <label class="wrp method-a">
46 <input type="radio" value="same" name="billing-method" class="sellkit-billing-method-a" <?php checked( $is_billing || $is_billing_only ); ?> >
47 <span class="checkmark"></span>
48 <span class="labels"><?php echo esc_html__( 'Same as shipping address', 'sellkit' ); ?></span>
49 </label>
50 </div>
51 <hr>
52 <div>
53 <label class="wrp method-b">
54 <input type="radio" value="diff" name="billing-method" class="sellkit-billing-method-b" <?php checked( ! $is_billing && ! $is_billing_only ); ?> >
55 <span class="checkmark"></span>
56 <span class="labels"><?php echo esc_html__( 'Use a different billing address', 'sellkit' ); ?></span>
57 </label>
58 </div>
59 </div>
60
61 <?php endif; ?>
62
63 <?php
64 $hide_billing_fields_class = '';
65
66 if ( $is_billing ) {
67 $hide_billing_fields_class = 'hide-billing-fields-default';
68 }
69 ?>
70 <div class="woocommerce-billing-fields__field-wrapper <?php echo $hide_billing_fields_class; ?>" id="sellkit-checkout-billing-field-wrapper">
71 <?php
72 $fields = $checkout->get_checkout_fields( 'billing' );
73
74 do_action( 'sellkit_checkout_billing_fields', $fields, $checkout );
75 ?>
76 </div>
77
78 <?php do_action( 'woocommerce_after_checkout_billing_form', $checkout ); ?>
79 <div class="sub-heading">
80 <?php wc_get_template( 'checkout/terms.php' ); ?>
81 </div>
82 </div>
83