3/31/2024 0 Comments Maxmind geoip accuracySo WooCommerce is looking up the country for this IP address instead of the IP address that is stored in REMOTE_ADDR. HTTP_X_REAL_IP HTTP_X_FORWARDED_FOR REMOTE_ADDR WooCommerce will generally check the following variables for the real IP (starting from the top): ![]() WooCommerce were the ones who were able to detect the problem after some time and suggested a solution/ work around. They weren’t really helpful in providing info regarding all this. Maybe this happened after some update they did, i don’t know. It seems that only recently they started to populate HTTP_X_FOWARDED_FOR with my server’s static IP. I would like to share with you how it was solved after reaching out to my provider and WC, just in case a client having the same provider comes forward with the same issue. You can find some recommendations here.if that array is empty – woo geo functionality doesn work on your site/server. ![]() update front of the site and and find printed array (CTRL+U then CTRL+F search ‘ Array‘).$pd = WC_Geolocation::geolocate_ip() print_r($pd) drop there next script on the same bottom of the file:.For testing GeoIP functionality you can use next service: ĪTTENTION: If you sure that recommendations above done right – check is woo geo functionality works at all on your site:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |