Configuring WooCommerce geolocation
WooCommerce includes geolocation by IP feature. This function calculates the user’s country using his IP before the user sets the address on the checkout or cart page.
Configuring this WooCommerce feature is essential to display the correct price, taxes, and currency to the new users visiting your store.
“Price Based on Country” includes a setup wizard to help store owners configure the geolocation in a guided way. It runs automatically for new installations after the plugin activation.
The geolocation function requires the MaxMind GeoIP database GeoIP. You need a free MaxMind license key to access the GeoIP database download and update it periodically.
Create a MaxMind license key
If you do not have an account on MaxMind.com, create one from https://www.maxmind.com/en/geolite2/signup
- On the registration page, complete the form with your information. If you’re not sure what to choose as “Industry” and “Intended use” fields, fill them with “eCommerce” and “Price localization,” respectively.
- After submitting, you’ll get an email shortly after submitting with a link to set your password.
- Click on that link and choose a password.
After creating the account, go to: https://www.maxmind.com/en/account
- Select the “Manage License Keys” tab in your user account dashboard.
- Select “Generate new license key.” In the form:
- Add a description (just like the name of your store)
- Choose “No” next to “Will this key be used for GeoIP Update?”
- Select “Confirm.”
Copy the key and paste it into the setup wizard field.
Reusing the setup wizard
If you want to rerun the Geolocation Setup Wizard, you can do it from WooCommerce > Settings > Pricing zones > Options > Advanced.
Check the WooCommerce System Report
Go to WooCommerce > Status and scroll down until the “Geolocation debug info” section. Check if there is some problem that could cause the geolocation function not to work correctly.