• Resolved eshna189

    (@eshna189)


    The plugin was working fine until yesterday. Suddenly the plugin doesn’t do anything anymore. It just shows the default currency of $.

    I tried switching from Geolocate with page caching support to Geolocate. I tried loading product prices in the background. I deactivated all my caching plugins. Nothing seems to help. I have no idea what suddenly went wrong.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Oscar Gare

    (@oscargare)

    Hi,
    I reviewed your site, and I checked that PBoC is working because when I changed the country to ES (Spain) by adding the parameter wcpbc-manual-country=ES to the URL, the price and currency changed.

    It seems a problem relate to how your hosting is providing the user IP. Could you review the Geolocation debug info of your WooCommerce system report? (the Geolocation debug info only is display if PBoC is active)

    The IP of the first variable that appears must match the real IP (the last value).

    Thread Starter eshna189

    (@eshna189)

    Hi Oscar,

    Thanks for your response. Geolocation dubug info:

    HTTP_CF_IPCOUNTRY: X
    GEOIP_COUNTRY_CODE: X
    HTTP_X_COUNTRY_CODE: X
    HTTP_X_REAL_IP: X
    HTTP_X_FORWARDED_FOR: 192.185.20.98
    REMOTE_ADDR: 183.82.16.81
    Real external IP: 183.82.16.81

    Plugin Author Oscar Gare

    (@oscargare)

    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.

    Thread Starter eshna189

    (@eshna189)

    Thank you so much Oscar!

    I didn’t even have to try the first two options. The third one did the trick.

    Thanks again!

    Hi I’m having the same issue with my website https://www.ajali.com.ng
    It was working perfectly up until 2 days ago and now all my prices are being displayed in the default currency USD. I’ve contacted my hosting platform and they are telling me there’s no IP address issues, is there anyway you can help.

    Here’s a link to the debug info from my plugin

    View post on imgur.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Currency Not Converting Anymore’ is closed to new replies.