L
L
ligisayan2019-02-14 19:21:28
WordPress
ligisayan, 2019-02-14 19:21:28

How to remove the extra shipping field in the admin panel with an order in the woocommerce store?

Hello! There is a store on woocommerce in which the wordpress plugin Checkout Field Editor is installed to generate customer information fields to manage.
Created one custom delivery address field instead of 6 standard ones (address 1b2, zip code, city, country) - just turned them off in the plugin admin panel. But, the block itself with the address and the address field remained with the incoming order and now the information is redundant, and the address is not set with the record.
5c6593a4ef53b501848288.png
How can this block be excluded from the admin panel, and it’s better to even register my address field in its place - this is an ideal option.
Here is the code written in functions.php does not give a result

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
     unset($fields['billing']['billing_address_1']);
     unset($fields['billing']['billing_address_2']);
     unset($fields['billing']['billing_city']);
     unset($fields['billing']['billing_postcode']);
     unset($fields['billing']['billing_country']);
     unset($fields['billing']['billing_state']);
 
     return $fields;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timofey Tkachev, 2019-02-14
@ligisayan

There is a WooCommerce Checkout Manager plugin - better than editing functions.php. I somehow accumulated a lot of edits in it, the template update came out and something burned in the lumbar region.
In short, now I try to implement everything with plugins.
Good luck)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question