Turn Off WooCommerce Customer Geolocation
Stops WooCommerce from looking up each visitor's location from their IP address and uses your store's base country as the default customer location instead.
Opens WPIDE on
Code
add_filter( 'pre_option_woocommerce_default_customer_address', function () {
return 'base';
} );
Notes
Tax and shipping estimates then start from your store's address until the customer enters their own.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.