Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by Prosenjit Barman 1 year, 4 months ago.

Assisted by: Prosenjit Barman.

Author Posts
October 5, 2023 at 11:42 am #14519871

jamesG-38

I am trying to:
Switch between currency on the front end, however it always flips back to the original currency.

Link to a page where the issue can be seen:
hidden link

I expected to see:
A different currency converted.

Instead, I got:
The same currency and same price.

Screenshot 2023-10-05 at 13.41.17.png
October 6, 2023 at 6:49 am #14524267

jamesG-38

Given this message (attached) last week I excluded caching for cookie "wcml_custom_currency_cookie" in WP rocket as attached. Could that be directly related to this issue?

I have removed it again for now and flushed the WP rocket cache.

Screenshot 2023-10-06 at 08.47.11.png
Multicurrency issue 2023-09-23 at 10.47.58.png
October 6, 2023 at 9:19 am #14525875

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're having and will try my best to assist you in this matter.

While checking, I found that an AJX request to WooCommerce(wc-ajax=get_refreshed_fragments) that contains the currency switcher Cookie is getting canceled after a few seconds. This is why, the currency is not getting updated.

Would you kindly check what happens if you keep all plugins disabled, except for WPML, String Translation, WooCommerce, and WooCommerce Multilingual plugin?

After doing so, if you can switch between different currencies without any issue, begin reactivating the plugins one at a time. After activating each plugin, check if you can still switch between the currencies. In this way, you'll be able to pinpoint what actually causing the issue.

Let me know how it goes. I will be happy to help if you need further assistance on this matter.

Best regards,
Prosenjit

October 10, 2023 at 10:09 am #14548379

jamesG-38

FYI deactivating / reactivating is totally impractical. We have around 50-60 plugins... Fortunately the issue seems stable right now (i.e. it works). It is recurs I will raise it again.

October 11, 2023 at 7:59 am #14556201

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the update.

Please note that we only suggest conducting a plugin conflict test when we suspect that a conflict may be the cause of the issue.

Happy to hear that everything is working fine now. If you ever encounter the issue, feel free to let me know. I will be happy to help.

Best regards,
Prosenjit

October 11, 2023 at 12:42 pm #14559423

jamesG-38

Hi, wrote too soon. This issue recurs again. Can you explain to me whether or not this could be a factor?

"WooCommerce Multilingual & Multicurrency detected an active cache plugin on your site.
Caching may cause currency display issues for your customers if you are using the multicurrency feature.
To avoid this, set your cache plugin to not cache pages for visitors that have a cookie set in their browser."

And if so, what to do about it?

In addition do you think this may be more reliable if I were to choose "Show currencies based on Site Language" Instead of "Client Location"? (it has been on Client location so far).

BR, James

Screenshot 2023-10-11 at 14.42.27.png
Screenshot 2023-10-11 at 14.40.06.png
October 12, 2023 at 7:12 am #14563027

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello James,
Thank you for the update.

The Message you're talking about usually appears if the optimization plugin tries to cache the essential cookies of the WooCommerce Multilingual plugin.

Since you're using WP Rocket, please add the following cookies to the cache exclusion list under the Advanced Rules of WP Rocket.

- wcml_client_currency
- wcml_client_currency_language
- wcml_client_country

[The wcml_client_country cookie is linked to currency display based on Geolocation.]

Since you've configured the currency to appear according to the Geo-Location, please make sure that everything is configured correctly as per the documentation below.

- https://wpml.org/documentation/related-projects/woocommerce-multilingual/multi-currency-support-woocommerce/#currencies-per-location

An important thing to keep in mind- If you've set up the currency based on location correctly while editing the currency, you'll find an option to designate the country for which the currency should display. Refer to this screenshot for clarity: hidden link.

Ensure that you configure this setting accurately for each currency.

You can also switch to display currency based on location and see if that helps.

I hope it will help. But, if you need further assistance, feel free to let me know. I will be happy to help.

Best Regards,
Prosenjit