The free, core WooCommerce plugin enables store owners to automatically geolocate customers to display tax rates and shipping methods specific to their location. To determine this, WooCommerce integrates with MaxMind GeoLite2 geolocation data (as of version 3.9+).
This document covers:
- Enabling geolocation.
- Creating a MaxMind account.
- Generating a MaxMind license key.
- Adding the MaxMind license key to your site.
- How your WooCommerce site updates the MaxMind geolocation database.
Enabling geolocation
↑ Back to topTo enable the MaxMind geolocation integration:
- In your site’s WP Admin dashboard, navigate to WooCommerce > Settings > General.
- Scroll down to the General options section.
- From the Default customer location dropdown, select Geolocate or Geolocate (with page caching support).
Once geolocation is enabled, you’ll need to create a MaxMind account and configure MaxMind via the Integration tab in WooCommerce > Settings.
Create a MaxMind account
↑ Back to top- Visit MaxMind’s GeoLite2 sign-up page.
- Complete the registration form. If you’re unsure about which option to select in the Industry and Intended use fields, use eCommerce Platform and Content customization respectively.
- After successfully submitting the form, you’ll receive an email containing a link to set your password. Click it and choose a secure password.
Create a MaxMind license key
↑ Back to topNow that you have a MaxMind account, you can create a license key.
- Log in to MaxMind and navigate to https://www.maxmind.com/en/account.
- Click the Manage License Keys tab in your user account dashboard.
- Click the Generate new license key button.
- Next, fill in the form to generate a license key.
- Add a description (this can be the name of your store).
- For the Will this key be used for GeoIP Update? option, select No.
- Click the Confirm button.
- You will be presented with a new license key. Copy and save this key somewhere safe immediately as it will be shown only once.
Note: While you can only generate a maximum of 25 license keys on MaxMind, it appears that the same license can be used on multiple sites.
Add MaxMind license key to WooCommerce
↑ Back to topFinally, you need to add your license key to your store’s WooCommerce settings.
- In your WP Admin dashboard, navigate to WooCommerce > Settings > Integration > MaxMind Geolocation.
- Paste your license key into the MaxMind License Key field.
- Click the Save changes button.
Your WooCommerce store is now ready to geolocate customers using MaxMind.
Updating the MaxMind database
↑ Back to top- The system automatically updates every 15 days, using WordPress’s built-in WP-Cron function to trigger
woocommerce_geoip_updater
. - If the MMDB file on your server doesn’t seem to be updated correctly after this time, you can install the third-party WP Crontrol plugin to troubleshoot scheduled cron events in WordPress.
- Once this plugin is installed and active, you can go to Tools > Cron Events and check the next scheduled time for this event — or choose to run it manually.
Why am I seeing ?v=$hash
query strings added to my site’s URLs? (e.g. https://my.example.shop/?v=bc74b2d76824
)
When you select the Geolocate (with page caching support) option, WooCommerce appends a user-specific hash of the user’s IP address to the URL so that the page can be cached for their re-use. This enables location-specific data (like tax rates and shipping information) to be cached for your customers as they navigate your store.
If you’d like to prevent these query strings from being added, select the Geolocate option instead.
Questions and support
↑ Back to topDo you still have questions and need assistance?
This documentation is about the free, core WooCommerce plugin, for which support is provided in our community forums on WordPress.org. By searching this forum, you’ll often find that your question has been asked and answered before.
If you haven’t created a WordPress.org account to use the forums, here’s how.
- If you’re looking to extend the core functionality shown here, we recommend reviewing available extensions in the WooCommerce Marketplace.
- Need ongoing advanced support or a customization built for WooCommerce? Hire a Woo Agency Partner.
- Are you a developer building your own WooCommerce integration or extension? Check our Developer Resources.
If you weren’t able to find the information you need, please use the feedback thumbs below to let us know.