If you run a Woocommerce shop and you use WPML not only to translate products but also to have different currencies for you users this trick may be for you.
Let’s say for example that your shop currency is EUR but you also sell products for Switzerland where their currency is CHF. So if you have a user than comes from Switzerland you want to show them their default currency. You can accomplish that easily using a PHP filter and the Geotargeting Pro plugin by adding the following code:
You can create a lot more with Geolocation API provided in the plugin and WooCommerce like for example hiding products for certain countries or redirect users based on their location .So be sure to take a look.
This tip was shared by Andras Guseo from Divi Magazine