Content of the page

How to get GEO IP data about the user on the site

Content of the article

Use the next WooCommerce code:

You can then do: print_r($pd) and see all info which are provided by WooCommerce GEO IP functionality

Or you can simply get country code by: (GEO IP should be enabled in WOOCS)

For example:

Use Alpha-2 code for countries: https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes

Read also: https://currency-switcher.com/function/woocs-get_currency_by_country/