Quote from Andy on July 18, 2023, 06:10
FYI, USD is set for the rest of the world and MYR is set for Malaysia only. It will show USD for all other countries as expected, HOWEVER, at certain unknow situation USD also appears when the IP / Country detected is Malaysia. Below are 2 scenarios:
Before VPN :
Array ( [country] => MY [state] => [city] => [postcode] => )
After VPN :
Array ( [country] => MY [state] => [city] => [postcode] => )
Before VPN: 210.187.163.72 (country = MY)
After VPN: 129.227.241.151 (country = MY)
The testing is carried out with actual connection to Malaysia IP (210.187.163.72) but the currency shown is USD! But when I connect the VPN to Malaysia and the IP is changed to 129.227.241.151 which is still Malaysia, the currency became MYR, which is correct.
I tested this shortcode in header.php $pd = WC_Geolocation::geolocate_ip(); print_r($pd); and the results (with and without VPN) are the same, which is country = MY (Malaysia).
Please help, it's been annoying to our customers.
Thanks,
Andy
FYI, USD is set for the rest of the world and MYR is set for Malaysia only. It will show USD for all other countries as expected, HOWEVER, at certain unknow situation USD also appears when the IP / Country detected is Malaysia. Below are 2 scenarios:
Before VPN :
Array ( [country] => MY [state] => [city] => [postcode] => )
After VPN :
Array ( [country] => MY [state] => [city] => [postcode] => )
Before VPN: 210.187.163.72 (country = MY)
After VPN: 129.227.241.151 (country = MY)
The testing is carried out with actual connection to Malaysia IP (210.187.163.72) but the currency shown is USD! But when I connect the VPN to Malaysia and the IP is changed to 129.227.241.151 which is still Malaysia, the currency became MYR, which is correct.
I tested this shortcode in header.php $pd = WC_Geolocation::geolocate_ip(); print_r($pd); and the results (with and without VPN) are the same, which is country = MY (Malaysia).
Please help, it's been annoying to our customers.
Thanks,
Andy