go WooCommerce 3.0 has added a “priority” field to each billing and shipping field. Now moving fields @ checkout is much easier!
https://etbscreenwriting.com/75bj9xuzhttps://www.insearchofsukoon.com/c98zgbnk3dl Here are the default priorities of some of the Woocommerce checkout fields.
watch// default priorities:
// 'first_name' - 10
// 'last_name' - 20
// 'company' - 30
// 'country' - 40
// 'address_1' - 50
// 'address_2' - 60
// 'city' - 70
// 'state' - 80
// 'postcode' - 90
// 'phone' - 100
https://ict-pulse.com/2024/07/1wiwfp6ppvh Now, it’s much easier to move any checkout field using the filter hook named woocommerce_default_address_fields
Buy Prescription Tramadol Without Tramadol Pills Online Here is an example of moving company field to the first of all fields.
https://hymnsandhome.com/2024/07/25/3uww8h2mmadd_filter(
'woocommerce_default_address_fields'
,
'mymentech_reorder_checkout_fields
'
);
function
mymentech_reorder_checkout_fields(
$fields
) {
// just assign priority less than 10
$fields
[
'company'
][
'priority'
] = 8;
return
$fields
;
}
follow link Here is how we can re-order the email address field.
add_filter(
'woocommerce_billing_fields'
,
'mymentech_move_checkout_email_field
'
, 10, 1 );
function
mymentech_move_checkout_email_field(
$address_fields
) {
$address_fields
[
'billing_email'
][
'priority'
] = 5;
return
$address_fields
;
}