Geolocation of WooCommerce doesn't work

Completed Posted 5 years ago Paid on delivery
Completed Paid on delivery

I have installed the “WooCommerce Currency Switcher” plugin which detects the visitors location and shows prices in local currency. It always shows prices in default currency USD.

However, the plugin uses geolocation of WooCommerce, so I guess it’s not a plugin issue.

I have placed a shortcode (at the end of the intro text on home page) that shows the current location of the visitor. And I’ve visited the website via proxy from different locations and it always shows me USA.

After placing some code from the plugin support the location showed an empty space.

– GeoLite2 database: shows green tick

– Default customer location: Geolocate

– Cloudflare is set to pause, but IP Geolocation option under the Network tab is "ON"

You should fix the issue that the currency is being displayed according to the visitors country.

Here is the code:

add_filter( ‘woocommerce_geolocate_ip’,function( $country, $ip_address, $fallback, $api_fallback ){

return $_SERVER[“HTTP_CF_IPCOUNTRY”];

},4,99);

MySQL PHP Web Hosting WooCommerce WordPress

Project ID: #19152656

About the project

5 proposals Remote project Active 5 years ago

Awarded to:

erranjit28111989

Hello Greetings! I can help you now. Many thanks for posting the job here.! I can get this job done perfectly. i can help you to fixed local currency issue :) in any case you may visit my profile to see my SKI More

$17 USD in 1 day
(57 Reviews)
4.5

5 freelancers are bidding on average $28 for this job

waltermonica

Hello, I've experience in WooCommerce Multilingual as well as Geolocation, I can debug and fix the issue immediately. Thanks

$17 USD in 1 day
(2 Reviews)
3.7
iGTTech

Hello There, I have 9+ years of hands-on experience efficiently coding websites and applications using modern HTML, CSS, JavaScript, Bootstrap, jQuary, CakePHP, PHP, WordPress, WooCommerce, Laravel, Yii2, MySQL, SQL, More

$30 USD in 1 day
(8 Reviews)
3.1