Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter davidospinacolombia

    (@davidospinacolombia)

    Yes, man, absolutely correct!

    The problem was fixed with the adding of a line of code to wp_config.php, as you suggest in the other topic.

    I will put it here, in case someone has the same problem in the future:

    The WooCommerce geolocation function is always returning the United States as customer country because your server variable HTTP_X_FORWARDED_FOR does not contains the real user’s IP.

    HTTP_X_FORWARDED_FOR: 192.185.20.98
    REMOTE_ADDR: 183.82.16.81, This IP matchs with your real external IP (183.82.16.81)

    To solve it you have 3 options:
    + Contact your hosting support to solve the issue.
    + Add Cloudflare to your site. Cloudflare includes geolocation and it’s free.
    + Add the following code to your config.php before the text /* That’s all, stop editing! Happy blogging. */:

    $_SERVER['HTTP_X_FORWARDED_FOR'] = $_SERVER['REMOTE_ADDR'];

    I hope this helps you.

    Thank you so, so much!! It was a lot of help!!

    Thread Starter davidospinacolombia

    (@davidospinacolombia)

    The very nature of the problem, by the way, is that, regardless of the customer’s location, the site always believes that she/he is from USA! And so it shows the prices for the US zone.

    Please help me!!

    Thread Starter davidospinacolombia

    (@davidospinacolombia)

    The very nature of the problem, by the way, is that, regardless of the customer’s location, the site always believes that she/he is from USA! And so it shows the prices for the US zone.

    Please help me!!

    Thread Starter davidospinacolombia

    (@davidospinacolombia)

    By the way, this is a fragment from the status log:

    ### Geolocation debug info ###

    HTTP_CF_IPCOUNTRY: ?
    GEOIP_COUNTRY_CODE: ?
    HTTP_X_COUNTRY_CODE: ?
    HTTP_X_REAL_IP: ?
    HTTP_X_FORWARDED_FOR: 192.185.189.170
    REMOTE_ADDR: 190.151.234.231
    Real external IP: 190.151.234.231

    Is this relevant? If it is, How can I fix my issue?

Viewing 4 replies - 1 through 4 (of 4 total)