Geotagging issues
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from sinaigourmet on November 19, 2025, 15:06Hey.
Having about a 7-10% failure rate with Geotagging for Canadian customers and they are being treated and charged like US customers. I have inquired with customers and they are not using IP Blockers, or Ingonito mode etc.
Do you have a fix for this?
Is there a way to set the Currency Switcher to work on billing address instead?
Thanks.
Hey.
Having about a 7-10% failure rate with Geotagging for Canadian customers and they are being treated and charged like US customers. I have inquired with customers and they are not using IP Blockers, or Ingonito mode etc.
Do you have a fix for this?
Is there a way to set the Currency Switcher to work on billing address instead?
Thanks.
Quote from Alex Dovlatov on November 20, 2025, 13:35Hello
Read this please: https://currency-switcher.com/using-geolocation-causes-problems-doesnt-seem-to-work-for-me
Causes of Geolocation Issues:
1. MaxMind License Key Missing or Expired
Since WooCommerce v3.9+, a MaxMind GeoLite2 license key is required for geolocation to work.
Solution:Go to WooCommerce → Settings → Integration → MaxMind Geolocation
Register for a free license at https://www.maxmind.com/en/geolite2/signup
Add your license key
The database updates automatically every month2. Caching Issues
If you're using caching plugins (WP Rocket, LiteSpeed, Cloudflare, etc.), they serve cached pages with default currency before WOOCS can detect location.
Solution:In WooCommerce → Settings → General: Set "Default customer location" to "Geolocate (with page caching support)"
For WP Rocket: Cache → User Cache → Enable "Disable caching for logged-in users"
Consider excluding shop/product pages from cache
Note: WOOCS works with caching by redrawing prices via AJAX after page load3. Server/Proxy IP Issues
Some hosting providers (Bluehost, servers with Varnish, Cloudflare) may send their own server IP instead of the visitor's real IP.
Solution:Check if your hosting uses reverse proxy/load balancer
Ask your hosting to configure HTTP_X_REAL_IP or HTTP_X_FORWARDED_FOR headers correctly
For Cloudflare: Dashboard → Caching → Configuration → set "Browser Cache TTL" to "Respect Existing Headers"4. Browser Caching & Testing
Geolocation only works on first visit. After that, WOOCS remembers the user's currency choice.
Solution:Test using different browsers or incognito/private mode
Use VPN or https://www.locabrowser.com for testing different locations
Clear cookies between testsQuick Diagnostic Test:
Add this shortcode to any page: [woocs_geo_hello]
It should display: "Your country is: [Country Name] (defined by WooCommerce GeoIP functionality)"
If it shows wrong country or no output → the issue is with WooCommerce geolocation, not WOOCS.
Additional Checks:Go to WooCommerce → Status → scroll to "Geolocation debug info" section
Verify WOOCS plugin is updated to the latest version
Check if any security plugins are blocking geolocation requestsPlease try these solutions and let me know the results. If the [woocs_geo_hello] shortcode shows incorrect country, we'll need to investigate the WooCommerce MaxMind integration specifically.
Billing country, Add this code to your theme's functions.php:
add_action('woocommerce_checkout_update_order_review', function($post_data) {
global $WOOCS;parse_str($post_data, $data);
if (isset($data['billing_country']) && !empty($data['billing_country'])) {
$country = $data['billing_country'];// Map billing country to currency
$currency_map = array(
'US' => 'USD',
'CA' => 'CAD',
);if (isset($currency_map[$country]) && $WOOCS->current_currency !== $currency_map[$country]) {
$WOOCS->set_currency($currency_map[$country]);
}
}
}, 10);
When a customer selects their billing country during checkout, WooCommerce automatically recalculates the order via AJAX. We can hook into this process to switch the currency at the same time. This will automatically switch to CAD when Canada is selected, and USD for USA. The order totals will recalculate immediately.
You can add more countries to the $currency_map array as needed.
Hello
Read this please: https://currency-switcher.com/using-geolocation-causes-problems-doesnt-seem-to-work-for-me
Causes of Geolocation Issues:
1. MaxMind License Key Missing or Expired
Since WooCommerce v3.9+, a MaxMind GeoLite2 license key is required for geolocation to work.
Solution:
Go to WooCommerce → Settings → Integration → MaxMind Geolocation
Register for a free license at https://www.maxmind.com/en/geolite2/signup
Add your license key
The database updates automatically every month
2. Caching Issues
If you're using caching plugins (WP Rocket, LiteSpeed, Cloudflare, etc.), they serve cached pages with default currency before WOOCS can detect location.
Solution:
In WooCommerce → Settings → General: Set"Default customer location" to"Geolocate (with page caching support)"
For WP Rocket: Cache → User Cache → Enable"Disable caching for logged-in users"
Consider excluding shop/product pages from cache
Note: WOOCS works with caching by redrawing prices via AJAX after page load
3. Server/Proxy IP Issues
Some hosting providers (Bluehost, servers with Varnish, Cloudflare) may send their own server IP instead of the visitor's real IP.
Solution:
Check if your hosting uses reverse proxy/load balancer
Ask your hosting to configure HTTP_X_REAL_IP or HTTP_X_FORWARDED_FOR headers correctly
For Cloudflare: Dashboard → Caching → Configuration → set"Browser Cache TTL" to"Respect Existing Headers"
4. Browser Caching & Testing
Geolocation only works on first visit. After that, WOOCS remembers the user's currency choice.
Solution:
Test using different browsers or incognito/private mode
Use VPN or https://www.locabrowser.com for testing different locations
Clear cookies between tests
Quick Diagnostic Test:
Add this shortcode to any page: [woocs_geo_hello]
It should display:"Your country is: [Country Name] (defined by WooCommerce GeoIP functionality)"
If it shows wrong country or no output → the issue is with WooCommerce geolocation, not WOOCS.
Additional Checks:
Go to WooCommerce → Status → scroll to"Geolocation debug info" section
Verify WOOCS plugin is updated to the latest version
Check if any security plugins are blocking geolocation requests
Please try these solutions and let me know the results. If the [woocs_geo_hello] shortcode shows incorrect country, we'll need to investigate the WooCommerce MaxMind integration specifically.
Billing country, Add this code to your theme's functions.php:
add_action('woocommerce_checkout_update_order_review', function($post_data) {
global $WOOCS;
parse_str($post_data, $data);
if (isset($data['billing_country']) && !empty($data['billing_country'])) {
$country = $data['billing_country'];
// Map billing country to currency
$currency_map = array(
'US' => 'USD',
'CA' => 'CAD',
);
if (isset($currency_map[$country]) && $WOOCS->current_currency !== $currency_map[$country]) {
$WOOCS->set_currency($currency_map[$country]);
}
}
}, 10);
When a customer selects their billing country during checkout, WooCommerce automatically recalculates the order via AJAX. We can hook into this process to switch the currency at the same time. This will automatically switch to CAD when Canada is selected, and USD for USA. The order totals will recalculate immediately.
You can add more countries to the $currency_map array as needed.
Quote from sinaigourmet on December 3, 2025, 04:16Hi there,
For "Billing country, Add this code to your theme's functions.php:" code I have 2 questions:
1) Will it work if I add this to my snippet plug in and/or does it need modification for that?
2) Is it possible to modify so that Canada is in CAD and every other billing country in the world is USD?Thanks.
Hi there,
For"Billing country, Add this code to your theme's functions.php:" code I have 2 questions:
1) Will it work if I add this to my snippet plug in and/or does it need modification for that?
2) Is it possible to modify so that Canada is in CAD and every other billing country in the world is USD?
Thanks.
Quote from Alex Dovlatov on December 3, 2025, 12:40Hello1. SnippetYes, but one caveat:functions.php - loads very early (after_setup_theme), so add_action is guaranteed to be registered before AJAX.Snippet plugins: Good ones - load code via plugins_loaded or even like mu-plugins → should work.Bad ones - may load late → may be late for AJAX.AJAX issue: woocommerce_checkout_update_order_review - is an AJAX action. If the hook is added late, it may not be hooked.So, if for some reason it doesn't trigger (very rare), simply add it to functions.php instead - that's the most reliable method for checkout AJAX hooks. Snippet plugins work fine with this hook in 99% of cases, but functions.php is a 100% guarantee.2. CADI think Yes, try please use the code (as snippet OR functions.php):add_action('woocommerce_checkout_update_order_review', function($post_data) {global $WOOCS;parse_str($post_data, $data);if (isset($data['billing_country']) && !empty($data['billing_country'])) {$country = $data['billing_country'];// Canada = CAD, all other countries = USD$new_currency = ($country === 'CA') ? 'CAD' : 'USD';if ($WOOCS->current_currency !== $new_currency) {$WOOCS->set_currency($new_currency);}}}, 10);
Quote from sinaigourmet on December 3, 2025, 22:27I use CodeSnippets. Not sure if that tells you something.
Will try this first as getting error when trying to add to Child function.php
I use CodeSnippets. Not sure if that tells you something.
Will try this first as getting error when trying to add to Child function.php
Quote from Alex Dovlatov on December 4, 2025, 13:55No problem how you use it, with https://wordpress.org/plugins/code-snippets/ or with functions.php, Code Snippets plugin just made it more handy
No problem how you use it, with https://wordpress.org/plugins/code-snippets/ or with functions.php, Code Snippets plugin just made it more handy
Quote from sinaigourmet on December 15, 2025, 02:45Hi there,
The fix is working well for Canada and CAD however every so often a US purchase is being charged in CAD instead of USD. Any advise?
Not sure if it makes difference but in billing info country is "United States (US)".
Hi there,
The fix is working well for Canada and CAD however every so often a US purchase is being charged in CAD instead of USD. Any advise?
Not sure if it makes difference but in billing info country is"United States (US)".
Quote from Alex Dovlatov on December 15, 2025, 12:58Hello
A couple of ideas to try:
1. Change currency storage method In FOX settings, go to: Options tab → Currency storage → try switching to "transient" storage mode. This can help avoid conflicts with caching plugins.
2. Update the code with debug logging Replace your current code with this version that includes debugging:
add_action('woocommerce_checkout_update_order_review', function($post_data) { global $WOOCS; parse_str($post_data, $data); if (isset($data['billing_country']) && !empty($data['billing_country'])) { $country = trim($data['billing_country']); // Canada = CAD, all other countries = USD $new_currency = ($country === 'CA') ? 'CAD' : 'USD'; // Debug logging error_log('FOX billing country received: ' . $country . ' → currency: ' . $new_currency); error_log('FOX current currency: ' . $WOOCS->current_currency . ' → switching to: ' . $new_currency); if ($WOOCS->current_currency !== $new_currency) { $WOOCS->set_currency($new_currency); } } }, 10);After a US customer gets incorrectly charged in CAD, please check your server error logs (usually at
/wp-content/debug.logif WP_DEBUG_LOG is enabled). The logs will show what country code was received and what currency was set. This will help us identify the exact issue.
Hello
A couple of ideas to try:
1. Change currency storage method In FOX settings, go to: Options tab → Currency storage → try switching to "transient" storage mode. This can help avoid conflicts with caching plugins.
2. Update the code with debug logging Replace your current code with this version that includes debugging:
add_action('woocommerce_checkout_update_order_review', function($post_data) {
global $WOOCS;
parse_str($post_data, $data);
if (isset($data['billing_country']) && !empty($data['billing_country'])) {
$country = trim($data['billing_country']);
// Canada = CAD, all other countries = USD
$new_currency = ($country === 'CA') ? 'CAD' : 'USD';
// Debug logging
error_log('FOX billing country received: ' . $country . ' → currency: ' . $new_currency);
error_log('FOX current currency: ' . $WOOCS->current_currency . ' → switching to: ' . $new_currency);
if ($WOOCS->current_currency !== $new_currency) {
$WOOCS->set_currency($new_currency);
}
}
}, 10);
After a US customer gets incorrectly charged in CAD, please check your server error logs (usually at /wp-content/debug.log if WP_DEBUG_LOG is enabled). The logs will show what country code was received and what currency was set. This will help us identify the exact issue.
Quote from sinaigourmet on December 15, 2025, 22:29hi there,
I ran a test and it seems that if GEOlocation identifies as Canada it charges in CAD even if billing country is USD. If no IP or US IP it charges in USD correctly.
sorry for not being super technical but where do I access log to send to you in Wordpress Dashboard? (should I have turned on data log before and if so how to do so I can start again?)
hi there,
I ran a test and it seems that if GEOlocation identifies as Canada it charges in CAD even if billing country is USD. If no IP or US IP it charges in USD correctly.
sorry for not being super technical but where do I access log to send to you in Wordpress Dashboard? (should I have turned on data log before and if so how to do so I can start again?)
Quote from Alex Dovlatov on December 16, 2025, 13:34Hello
Since FOX is a currency switcher, it relies on geolocation data provided by external services (MaxMind or WooCommerce's built-in geolocation). FOX doesn't perform geolocation itself - it just receives the country data and switches currency accordingly.
If locations near the US-Canada border are being incorrectly identified, this is a geolocation accuracy issue, not a FOX issue. Geolocation by IP is never 100% accurate, especially near borders.Solution: Disable geolocation in FOX settings and configure it to switch currency based on the billing country selected by the customer at checkout. This way, the customer controls which currency they want by choosing their billing country. Otherwise, these geolocation errors will continue to occur.
Just to clarify - have you already added that debug code to your
functions.phpfile?If yes, then you need to:
- Enable WordPress debug logging (add to
wp-config.php):define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);
- Reproduce the issue (US customer checkout)
- Download
/wp-content/debug.logvia FTP- Send me the lines that start with "FOX billing country" or share link with file here or in the private area of this ticket
If you haven't added the code (previously mentioned) yet, you need to add it to your theme's
functions.phpfile first (Appearance → Theme File Editor → functions.php).Let me know which step you're at.
Hello
Since FOX is a currency switcher, it relies on geolocation data provided by external services (MaxMind or WooCommerce's built-in geolocation). FOX doesn't perform geolocation itself - it just receives the country data and switches currency accordingly.
If locations near the US-Canada border are being incorrectly identified, this is a geolocation accuracy issue, not a FOX issue. Geolocation by IP is never 100% accurate, especially near borders.
Solution: Disable geolocation in FOX settings and configure it to switch currency based on the billing country selected by the customer at checkout. This way, the customer controls which currency they want by choosing their billing country. Otherwise, these geolocation errors will continue to occur.
Just to clarify - have you already added that debug code to your functions.php file?
If yes, then you need to:
- Enable WordPress debug logging (add to
wp-config.php):
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);- Reproduce the issue (US customer checkout)
- Download
/wp-content/debug.logvia FTP - Send me the lines that start with"FOX billing country" or share link with file here or in the private area of this ticket
If you haven't added the code (previously mentioned) yet, you need to add it to your theme's functions.php file first (Appearance → Theme File Editor → functions.php).
Let me know which step you're at.
Quote from sinaigourmet on December 16, 2025, 14:41hi there,
yes, I did add the code as a snippet already. can I then find error log?
sorry for my confusion. i thought the code you provided supersedes the geolocate function. i checked the a couple US orders that were misassigned and 1 is in fact close to the border however another was about 400 km away from border in New York. not sure if that qualifies as "close".
how would i disable geolocate to favour using billing address instead? i am guessing this would guarantee no issues moving forward!
hi there,
yes, I did add the code as a snippet already. can I then find error log?
sorry for my confusion. i thought the code you provided supersedes the geolocate function. i checked the a couple US orders that were misassigned and 1 is in fact close to the border however another was about 400 km away from border in New York. not sure if that qualifies as"close".
how would i disable geolocate to favour using billing address instead? i am guessing this would guarantee no issues moving forward!
Quote from Alex Dovlatov on December 17, 2025, 13:12Hello
Yes, if geotagging service doesn work normally its better to disable it:
- go to wp-admin/admin.php?page=wc-settings
- Default customer location -> select here "Shop base address" or "No location by default" https://share.pluginus.net/image/i20251217131128.png
- Also in FOX plugin remove in tab GeoIP rules all settings https://share.pluginus.net/image/i20251217130150.png
Hello
Yes, if geotagging service doesn work normally its better to disable it:
- go to wp-admin/admin.php?page=wc-settings
- Default customer location -> select here"Shop base address" or"No location by default" https://share.pluginus.net/image/i20251217131128.png
- Also in FOX plugin remove in tab GeoIP rules all settings https://share.pluginus.net/image/i20251217130150.png
Quote from sinaigourmet on December 17, 2025, 15:38this would disable all currency assigning and it would default to website's default currency correct?
if so we will just keep FOX and deal with occasional mishap
this would disable all currency assigning and it would default to website's default currency correct?
if so we will just keep FOX and deal with occasional mishap
Quote from sinaigourmet on December 19, 2025, 03:50hi there, quick question / help. how can I modify the code below to remove the logging function?
add_action('woocommerce_checkout_update_order_review', function($post_data) { global $WOOCS; parse_str($post_data, $data); if (isset($data['billing_country']) && !empty($data['billing_country'])) { $country = trim($data['billing_country']); // Canada = CAD, all other countries = USD $new_currency = ($country === 'CA') ? 'CAD' : 'USD'; // Debug logging error_log('FOX billing country received: ' . $country . ' → currency: ' . $new_currency); error_log('FOX current currency: ' . $WOOCS->current_currency . ' → switching to: ' . $new_currency); if ($WOOCS->current_currency !== $new_currency) { $WOOCS->set_currency($new_currency); } } }, 10);
hi there, quick question / help. how can I modify the code below to remove the logging function?
add_action('woocommerce_checkout_update_order_review', function($post_data) {
global $WOOCS;
parse_str($post_data, $data);
if (isset($data['billing_country']) && !empty($data['billing_country'])) {
$country = trim($data['billing_country']);
// Canada = CAD, all other countries = USD
$new_currency = ($country === 'CA') ? 'CAD' : 'USD';
// Debug logging
error_log('FOX billing country received: ' . $country . ' → currency: ' . $new_currency);
error_log('FOX current currency: ' . $WOOCS->current_currency . ' → switching to: ' . $new_currency);
if ($WOOCS->current_currency !== $new_currency) {
$WOOCS->set_currency($new_currency);
}
}
}, 10);Quote from Alex Dovlatov on December 19, 2025, 12:51Quote from sinaigourmet on December 17, 2025, 15:38this would disable all currency assigning and it would default to website's default currency correct?
if so we will just keep FOX and deal with occasional mishap
Hello
Just to clarify - disabling GeoIP won't lock your site to base currency only!
Here's what will happen:
- ✅ Currency switcher will still work - customers can manually change currency
- ✅ All your currencies remain active
- ❌ Only automatic currency detection by country will be disabled
So customers will just see your default currency on first visit, but can switch anytime. Your multi-currency setup stays fully functional.
Just remove that lines:
add_action('woocommerce_checkout_update_order_review', function($post_data) { global $WOOCS; parse_str($post_data, $data); if (isset($data['billing_country']) && !empty($data['billing_country'])) { $country = trim($data['billing_country']); // Canada = CAD, all other countries = USD $new_currency = ($country === 'CA') ? 'CAD' : 'USD'; if ($WOOCS->current_currency !== $new_currency) { $WOOCS->set_currency($new_currency); } } }, 10);
Article is created: https://currency-switcher.com/how-to-switch-currency-based-on-billing-address-instead-of-geolocation/
Quote from sinaigourmet on December 17, 2025, 15:38this would disable all currency assigning and it would default to website's default currency correct?
if so we will just keep FOX and deal with occasional mishap
Hello
Just to clarify - disabling GeoIP won't lock your site to base currency only!
Here's what will happen:
- ✅ Currency switcher will still work - customers can manually change currency
- ✅ All your currencies remain active
- ❌ Only automatic currency detection by country will be disabled
So customers will just see your default currency on first visit, but can switch anytime. Your multi-currency setup stays fully functional.
Just remove that lines:
add_action('woocommerce_checkout_update_order_review', function($post_data) {
global $WOOCS;
parse_str($post_data, $data);
if (isset($data['billing_country']) && !empty($data['billing_country'])) {
$country = trim($data['billing_country']);
// Canada = CAD, all other countries = USD
$new_currency = ($country === 'CA') ? 'CAD' : 'USD';
if ($WOOCS->current_currency !== $new_currency) {
$WOOCS->set_currency($new_currency);
}
}
}, 10);
Article is created: https://currency-switcher.com/how-to-switch-currency-based-on-billing-address-instead-of-geolocation/