Content of the page

Using Geolocation causes problems, doesn’t seem to work for me

Content of the article

Try to change geo location rules and look them in different browsers, because the same browser will show you only first result. Even better send link to the friends, because if data storage selected as transient you will see the same result in all browsers in your computer (the same IP) - another computer necessary - share link with friends.


You are in Spain, and want to check GeoLocation, so add JPY for example, save, go to Geo rules and for JPY set Spain 

Open Opera browser for example, I mean any another browser you not used for testing your site else and you will see that JPY is set! Do not do the same test in the same browser already, today exactly....

GeoLocation provided by native woocommerce native API, so it should works perfectly ... Any way WOOCS uses woocommerce functionality. Sometimes happens that in the places near border geo ip shows another country, for example in Spain in city Logroño shows that its in France.


From version 2.1.8/1.1.8 its possible use for testing this shortcode: [woocs_geo_hello] - drop it usual text-widget or any page to see info about state of GeoIp functionality on your site.

Also you can try next -  insert code below in your current wp theme file functions.php:

If you using any cache plugins enable: WooCommerce settings -> General -> Default customer location

If you using rocket cache plugin disable option 'Enable caching for logged-in WordPress users':

For testing GeoIP functionality you can use next service:

ATTENTION: If you sure that recommendations above done right - check is woo geo functionality works at all on your site:

  • open header.php of current wp theme
  • drop there next script on the same bottom of the file:
  • save the file
  • update front of the site and and find printed array (CTRL+U then CTRL+F search 'Array')
  • if that array is empty - woo geo functionality doesn work on your site/server
  • You can find some recommendations here


Faster WordPress Hosting