Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The currency switcher not working on the frontend.
Solution:
If you are using a caching plugin, please exclude some pages from caching: shop, cart, products ...
Relevant Documentation:
https://wpml.org/errata/caching-plugins-may-cause-issues-with-wcml-multi-currency-settings/

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 9 replies, has 2 voices.

Last updated by emilN-4 1 year ago.

Assisted by: Long Nguyen.

Author Posts
April 9, 2023 at 3:27 pm #13434359

emilN-4

I have another issue. When you are on the EN version of any product page and you change the currency, the page does not refresh with the new currency value. Even if I refresh it by myself, it does not show the needed value. Only after I go to the shopping cart, it shows the amount in the other currence. Please solve that since you have admin acccess. Here is a link for testing and seeing the issue (please hide it):
hidden link

April 9, 2023 at 3:31 pm #13434369

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Emil,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

Now I see the currency switcher works correctly in the English language on your site. Please check these screenshots
hidden link
hidden link

Can you please recheck this issue?

Look forward to your reply.
Thanks

April 10, 2023 at 9:22 am #13436507

emilN-4

Hi! No it doesn't work again. I click AUD for instance and the page still shows GBP after the refresh/after it loads and it's like that in Incognito (end after cleaning cache). Same with other currencies.
hidden link
hidden link

April 10, 2023 at 10:54 am #13436865

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

Now I see that issue. Please try to enable a minimal environment as below and see if it helps.
- Deactivate all plugins except WPML, WooCommerce and their addon plugins
- Switch to a standard theme of WordPress
❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: 
https://wordpress.org/plugins/duplicator/

Look forward to your reply.
Thanks

April 10, 2023 at 11:10 am #13436909

emilN-4

No, that is a copy of the answer in the other thread. Please debug WPML and see what is wrong with it that it does not load

April 11, 2023 at 2:15 am #13441101

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

It's the standard troubleshooting steps to find what causes the issue: from WPML itself or conflicting with another plugin or block of code on your site.

If you are not able to do that, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated. Your next reply is set to private to share the info.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: 
https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme and to change configurations on the site if needed. This is also a reason the backup is critical.

The credentials shared in the previous ticket was removed when the ticket is marked as Resolved.

Look forward to your reply.
Thanks

April 11, 2023 at 9:55 am #13443795

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

After deactivating the plugin WP Fastest Cache, I see the currency switcher works as well with non-logged in users.

According to the documentation https://wpml.org/errata/caching-plugins-may-cause-issues-with-wcml-multi-currency-settings/, can you try this:

hidden link - perhaps you can do this for shop page, cart, checkout, product pages

Look forward to your reply.
Thanks

April 11, 2023 at 11:59 am #13445449

emilN-4

Oh, thanks a lot! I understand. I tested with the plugin turned off and it really worked ok. I turned it on then and it again stopped reloading correctly.

Unfortunately, that is not very comfortable since these are tens of thousands of product pages that need caching. Is there any other way to fix that?

April 12, 2023 at 2:40 am #13451375

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for your feedback.

Currently, there isn't a workaround to fix this issue with WP Fastest Cache. If you want to investigate the issue further, please try to replicate the issue on a clean installation of WordPress hidden link
Then I will report it to our compatibility team.

Or you can use another caching plugin like WP Rocket, this issue is resolved with this plugin. Or WP Super Cache with a workaround here https://wpml.org/forums/topic/wpml-chat-support-ticket-by-katerinak-1641242888/#post-10295347

Look forward to your reply.
Thanks

April 12, 2023 at 3:51 pm #13457571

emilN-4

Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.