This thread is resolved. Here is a description of the problem and solution.
Problem:
Switching the currency based on the client's location doesn't work on Nginx Reverse Proxy
Solution:
WooCommerce Multilingual & Multicurrency plugin uses the built-in API in WooCommerce for geolocation: https://woocommerce.github.io/code-reference/files/woocommerce-includes-class-wc-geolocation.html#source-view.80.
So what is happening on your website is the server's IP is being served instead of the actual user IP. That means the website will see every user visiting the website is located in the US.
We came across a helpful document at https://ypereirareis.github.io/blog/2017/02/15/nginx-real-ip-behind-nginx-reverse-proxy/ that provides instructions on obtaining the actual user IP. Kindly review the document and let us know how it goes.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 7 replies, has 2 voices.
Last updated by 1 year, 8 months ago.
Assisted by: Ahmed Mohammed.