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

Default customer location
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.
You must manually clear the cache of your cache plugin and your hosting provider after set Geolocate with page caching support.

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 to get a license key.
Review how to create a MaxMind account and configure the license on the WooCommerce docs.

If you are using a WooCommerce version before 3.9, you can skip this section.

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.

MaxMin GeoIP WooCommerce status

Go to the Geolocation debug info section to verify no there issues in your SERVER variables.

Price Based on Country - Geolocation debug in the system report