| 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 |
<div class="woocommerce-billing-fields"> |
| 22 |
<?php if ( wc_ship_to_billing_address_only() && WC()->cart->needs_shipping() ) : ?> |
| 23 |
|
| 24 |
<h3><?php esc_html_e( 'Billing & Shipping', 'woocommerce' ); ?></h3> |
| 25 |
|
| 26 |
<?php else : ?> |
| 27 |
|
| 28 |
<h3 id="billing_fields_heading"><?php echo wp_kses_post( apply_filters( 'cartflows_woo_billling_text', esc_html__( 'Billing details', 'woocommerce' ) ) ); ?></h3> |
| 29 |
|
| 30 |
<?php endif; ?> |
| 31 |
|
| 32 |
<?php do_action( 'woocommerce_before_checkout_billing_form', $checkout ); ?> |
| 33 |
|
| 34 |
<div class="woocommerce-billing-fields__field-wrapper"> |
| 35 |
<?php |
| 36 |
$fields = $checkout->get_checkout_fields( 'billing' ); |
| 37 |
|
| 38 |
foreach ( $fields as $key => $field ) { |
| 39 |
woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); |
| 40 |
} |
| 41 |
?> |
| 42 |
</div> |
| 43 |
|
| 44 |
<?php do_action( 'woocommerce_after_checkout_billing_form', $checkout ); ?> |
| 45 |
</div> |
| 46 |
|
| 47 |
<?php if ( ! is_user_logged_in() && $checkout->is_registration_enabled() ) : ?> |
| 48 |
<div class="woocommerce-account-fields"> |
| 49 |
<?php if ( ! $checkout->is_registration_required() ) : ?> |
| 50 |
|
| 51 |
<p class="form-row form-row-wide create-account"> |
| 52 |
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox"> |
| 53 |
<input class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" id="createaccount" <?php checked( ( true === $checkout->get_value( 'createaccount' ) || ( true === apply_filters( 'woocommerce_create_account_default_checked', false ) ) ), true ); ?> type="checkbox" name="createaccount" value="1" /> <span><?php esc_html_e( 'Create an account?', 'woocommerce' ); ?></span> |
| 54 |
</label> |
| 55 |
</p> |
| 56 |
|
| 57 |
<?php endif; ?> |
| 58 |
|
| 59 |
<?php do_action( 'woocommerce_before_checkout_registration_form', $checkout ); ?> |
| 60 |
|
| 61 |
<?php if ( $checkout->get_checkout_fields( 'account' ) ) : ?> |
| 62 |
|
| 63 |
<div class="create-account"> |
| 64 |
<?php foreach ( $checkout->get_checkout_fields( 'account' ) as $key => $field ) : ?> |
| 65 |
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?> |
| 66 |
<?php endforeach; ?> |
| 67 |
<div class="clear"></div> |
| 68 |
</div> |
| 69 |
|
| 70 |
<?php endif; ?> |
| 71 |
|
| 72 |
<?php do_action( 'woocommerce_after_checkout_registration_form', $checkout ); ?> |
| 73 |
</div> |
| 74 |
<?php endif; ?> |
| 75 |
|