FOX - Currency Switcher for WooCommerce

[woocs_geo_hello]

A diagnostic shortcode for Geo IP. Drop it into a text widget or any page and it prints what the plugin currently knows about the visitor's location and which currency the rules resolved for it. Available from v.2.1.8 / 1.1.8. Example: [woocs_geo_hello]

What it is for

Geo IP problems are almost always one of three things, and this shortcode tells you which in a few seconds:
  • Geolocation is not running at all — from WooCommerce 3.9 it needs a MaxMind key in the WooCommerce settings. Without it there is no country to work from.
  • The country is detected but no rule matches it — the detection works, the Geo IP rules simply have no entry for that country.
  • Everything resolves correctly but the page is cached — the shortcode shows the right answer while visitors see something else, because they are being served a page built for whoever loaded it first.
Remove it when you are done. It exposes the visitor's detected location on the page, which is not something to leave on a live shop. See also geolocation not working and WooCommerce price based on country.