S
S
shpilevich2018-11-04 21:27:08
WordPress
shpilevich, 2018-11-04 21:27:08

How to remove Woocommerce country selection?

Hello. How to disable country selection in woocommerce at checkout. I did it through Saphali, removed the field, but at checkout it says that enter the address.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
uRoot, 2018-11-05
@uroot

Look here: link , see WooCommerce Basic Settings section

S
Sergey, 2018-11-05
@werwolflg

I have disabled the delivery check this way in the theme's functions.php file.
add_filter( 'woocommerce_cart_needs_shipping', 'filter_function_disable_shipping' );
function filter_function_disable_shipping( $needs_shipping ){
return false;
}
The field itself is removed like this:
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
unset($fields['billing']['billing_country']);
return $fields;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question