PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Doesn't switch currency with language

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi,

Dev site:  https://scldev.uk

sample product: https://scldev.uk/shop/desktop-frames/8x6-acrylic-desktop-frame/

Site theme: Legenda Child theme

Currently installed your plugin: WOOCS - WooCommerce Currency Switcher

Other significant plugins:

Woocommerce Version 4.0.1

GTranslate 2.8.54

Goal: Switch currency to EUR when French language is active in the site--but the plugin doesn't do that.

Added the following code to child theme's functions.php

 

add_filter( 'wp_head' , function() {
$lang = isset($_SERVER['HTTP_X_GT_LANG']) ? $_SERVER['HTTP_X_GT_LANG'] : '';
global $WOOCS;
switch ($lang)
{
case 'fr_FR':
$WOOCS->set_currency('EUR');
break;
default:
$WOOCS->set_currency('GBP');
break;
}
});

Hope you can help. Thanks.

Also, when enabling the side switcher, it only shows the EUR currency and price for less than a second and then switches back to pound.

Hello

My  test - https://c2n.me/46NfKqe

It looks like a cache problem. Please  disable  a cache  plugin and  do test

 it only shows the EUR currency and price for less than a second and then switches back to pound. - The plugin checks the current currency and if the current currency is not correct, the plugin redraws prices in Ajax mode

Hi Pablo,

Thanks for a timely response.

In your video, it shows the dollar sign"$",  which should not be the case as the currencies I set up in the site are only for EUR and GBP. See attached. I don't know what I'm missing.

Current curriencies

Hello

Please contact  to GTranslate suport.  Ask if the current language code is determined correctly: https://c2n.me/46OwvJp.png

Hi Pablo,

Thanks.

I got in touch with GTranslate and found out that the problem was the language code, where 'fr_FR' should be 'fr'.

That solved it. All working now.

Thanks again.

Hello

Great!  welcome;)