# 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.

- Type: PHP
- Runs: Run everywhere
- Category: [Privacy & Cookies](https://wpide.com/library/category/privacy/)
- Requires: WooCommerce
- Tags: woocommerce, geolocation, ip-address
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/privacy-woo-no-geolocation/

## Code

```php
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 use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Turn Off WooCommerce Customer Geolocation" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
