get_checkout_fields( 'billing' )
);
$fields_layout = array(
array(
'billing_first_name',
'billing_last_name',
),
array(
'billing_company',
),
array(
'billing_country',
),
array( 'billing_state' ),
array(
'billing_city',
'billing_postcode',
),
array(
'billing_address_1',
),
array(
'billing_address_2',
),
array(
'billing_phone',
'billing_email',
),
);
$outside_layout_fields = array_diff(
array_keys( $billing_address_fields ),
array_reduce(
$fields_layout,
function( $result, $row ) {
return array_merge( $result, $row );
},
array()
)
);
$exclude_fields = array( 'billing_email' );
?>
';
foreach ( $row as $field_key ) {
if ( ! isset( $billing_address_fields[ $field_key ] ) ) {
continue;
}
echo '
';
woocommerce_form_field(
$field_key,
$billing_address_fields[ $field_key ],
$checkout->get_value( $field_key )
);
echo '
';
}
echo '
';
}
/**
* Displaying other fields that not existed in Brandy layout
*/
foreach ( $outside_layout_fields as $field_key ) {
if ( ! isset( $billing_address_fields[ $field_key ] ) || in_array( $field_key, $exclude_fields, true ) ) {
continue;
}
echo '';
woocommerce_form_field(
$field_key,
$billing_address_fields[ $field_key ],
$checkout->get_value( $field_key )
);
echo '
';
}
?>
is_registration_enabled() ) : ?>
is_registration_required() ) : ?>
get_checkout_fields( 'account' ) ) : ?>
get_checkout_fields( 'account' ) as $key => $field ) : ?>
get_value( $key ) ); ?>