Great question, isn’t it?
How do you make sure your shipping, taxes and currency settings are working properly when they depend on geolocation and you can only test from a single world location?
WooCommerce uses a free geolocation service called MaxMind. By default this is active via the settings but can be disabled. The set of functions (or class) that WooCommerce uses is in the /includes folder, and it’s called Class WC_Geolocation.
Why WooCommerce Geolocation
If you have enabled “geolocation” in your WooCommerce settings (see image), shipping, taxes, currencies and conditional content will be chosen based on the user IP address.
WooCommerce snippets like this can print content on screen based on IP address. Also, plugins such as the currency switcher can automatically geolocate the user in order to function.
Geolocation Testing Tools
A couple of Google searches, and the answer is right there! There are at least 3 decent website services (freemium model) that allow you to test your website from different locations. As a result, you get a screenshot from each location.
These tools are:
Happy testing 🙂
- WooCommerce: Detecting Current User Country (Geolocation)
You may need to add some “personalization” to your WooCommerce website homepage. For example, you could print a custom greeting based on the user’s IP address. For that, you can use PHP and WooCommerce inbuilt MaxMind Geolocation integration (when enabled from the General Settings Tab, of course). Detecting the current user country could be very […]
- WooCommerce: Hide Products Based on IP Address / Geolocation
There are many plugins that would allow you to do this in bulk or that would give you advanced features… but what if you just need to hide one product ID for users who are visiting your WooCommerce website from a specific country code? This is also called “geolocation” – remember this won’t work unless […]
- WooCommerce: How to Set Different Prices Based on User Role?
B2C WooCommerce stores can also have a B2B section. Wholesalers can offer different prices based on different criteria. Subscription stores can offer lower prices to current members. Either way, setting different WooCommerce prices for different users (“based on user role”) is not that difficult. All you need is a plugin (or a stack of plugins, […]
- WooCommerce: 85 Free Plugins for Every Challenge
WooCommerce is one of the most popular WordPress plugin for adding eCommerce or cart functionality to a WordPress website. According to recent research by aheadWorks, WooCommerce now accounts for 26.5% of the total eCommerce market share. And recent acquisition by Automattic indicates that it has a great future ahead. WooCommerce is well known for its […]
- WooCommerce: How to Enable Multi-Currency?
If you got here it’s because you’re looking to increase your sales conversion rate by enabling “Multi-Currency” in your WooCommerce website. The concept behind the currency switcher is simple: if I’m based in Europe I’d love paying in Euros, while if I were based in US I wouldn’t fancy the same treatment and I’d prefer […]