Configuring WooCommerce Geolocation
Since version 2.3, WooCommerce introduced a function that allows you to set the default customer location to their actual location by using his IP.
Price Based on Country uses the WooCommerce Geolocation function to display price and currency based on customer country.
Default Customer Address
To activate the WooCommerce Geolocation function, go to WooCommerce → Settings and set Default Customer Address option to one of these two options:
- Geolocate address, or
- if you are using a cache system, Geolocate with page caching support. Is the same as above, but does the geolocation via Ajax. This option adds to your website URLs a ?v=xxxxx parameter. This is normal to prevent static caching of prices.
Create a MaxMind Account
WooCommerce uses the MaxMind GeoIP database to determine the correct customer location. For WooCommerce to download the MaxMind database, first, you have to create a free account on MaxMind.com to get a license key.
Review how to create a MaxMind account and configure the license on the WooCommerce docs.
Check the WooCommerce System Report
Go to WooCommece → Status
Check the MaxMind GeoIP database have been download at the Database section. WooCommerce uses the MaxMind GeoIP database to geolocate customers. If WooCommerce cannot download the MaxMind GeoIP database, the Geolocation function will not work.
Go to the Geolocation debug info section to verify no there issues in your SERVER variables.