Hi,
It’s possible that Google play extension is changing the customer country for logged users. Could you test is the geolocation works in an incognito window?
https://www.pricebasedcountry.com/docs/getting-started/testing/
Thank you.
Thankl to you!
Anyway, I disabled Google Pay as payment method and the issue is the same. On Chrome Android on my smartphone, but not on Chrome Android of my friends, at checkout the “Country” field is empty. It doesn’t happen on my desktop (Chrome, Firefox, Explorer) and Geolocation works well. It also works well on my Firefox Android and CM Browser Android.
The only issue is on my Chrome Android and I dont know why. I tried deleting cache and cookies many times but..no luck!
If I put your plugin in Test Mode (France for example), my Chrome Android works well.
If i disable Test mode and I open my site in incognito window on my Chrome Android, it works well.
My htaccess settings to redirect www to not www and http to https are
RewriteEngine on
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTPS_HOST} ^www\. [NC]
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
and if i delete this setting from htaccess my Chrome works well.
My Woocommerce status about geolocation is
HTTP_CF_IPCOUNTRY: X
GEOIP_COUNTRY_CODE: X
HTTP_X_COUNTRY_CODE: X
HTTP_X_REAL_IP: 87.26.38.109
HTTP_X_FORWARDED_FOR: X
REMOTE_ADDR: 87.26.38.109
Real external IP: 87.26.38.109
Please help again
Updating info on my issue:
On some Chrome Android browsers it happens that, by connecting to my site in https mode, Woocommerce does not detect customer country (on checkout page “country” field is empty).
I made a test purchase (as a guest, so in logged out mode) from my Android Chrome and noticed in the Woocommerce order section that it comes from an IP address owned by Siteground, my web host.
So, why the real customer IP is not detected?
The issue does not happen if I turn off https redirection and i connect to my site in http mode.
Please help again,
Thanks
Hi,
Please contact with Siteground support, they should help you to solve the issue.
Did you enable Cloudflare in your Siteground account? Enabling Cloudflare should fix any issue related to geolocation:
https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-Cloudflare-IP-Geolocation-do-
Regards,
Oscar.
I found solution with Cloudflare. Thank you so much!