REORDER CHECKOUT FIELDS
-
Hi, i added a new custom field in checkout MYCUSTOMFIELD
but it appears at the end (is the last field).I’ve tried with
add_filter(“woocommerce_checkout_fields”, “order_fields”); function order_fields($fields) { $order = array( “MYCUSTOMFIELD”, “billing_first_name”, “billing_last_name”,”billing_country”,”cf”, “billing_company”, “billing_address_1”, “billing_address_2”, “billing_postcode”, “billing_email”, “billing_phone” ); foreach($order as $field) { $ordered_fields[$field] = $fields[“billing”][$field]; } $fields[“billing”] = $ordered_fields; return $fields; }
but it appears a blank field and the real field custom is still at the end…
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘REORDER CHECKOUT FIELDS’ is closed to new replies.