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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 20 replies, has 2 voices.

Last updated by Andreas W. 1 year, 9 months ago.

Assisted by: Andreas W..

Author Posts
June 20, 2022 at 9:01 am #11497113

nouraZ

Hi Andreas, thank you for your reply.
I will add this in later today when I have access to my laptop and let you know how it goes. Thanks!

June 21, 2022 at 9:53 am #11507125

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello Noura,

I did not hear back from you yet.

Could you please confirm if the suggested workaround solved the issue for you?

Best regards
Andreas

June 26, 2022 at 11:34 am #11545039

nouraZ

Hello Andreas, sorry for my late reply. I was traveling and did not have great internet access.
I have added the snippet to my functions file and it seems to have done the trick!
Thank you so much!
I would like to ask what exactly the function added did just to understand the workaround if possible.
Thank you again so so much!
Noura

June 29, 2022 at 2:43 am #11563367

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The issue is a cache issue and this filter hook should force the WPML/WCML caching for the currency switcher.

We had a similar issue with other cache plugins in the past:
hidden link

Best regards
Andreas

June 30, 2022 at 5:36 pm #11579721

nouraZ

Hello Andreas, Thank you for the explanation.

Now that the issue is resolved, I have noticed that when I initially make the currency switch on the shop page all the prices change but if I use a filter it goes back to the original currency. And if I refresh the page that doesn't help either because it resets the whole page and filters...
Any ideas on this?

PS. the staging site has been removed so please do let me know if you need me to create a new one for you to see on the back end, or I could also just make you a new user on the actual site.

Looking forward to hearing from you.

Have a great day ahead,

Noura

June 30, 2022 at 8:01 pm #11580665

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Yes, if possible, please set up a new staging so that I can run some tests and from there we will try to recreate the issue and escalate it internally.

If you will not be able to set up a staging, I can offer to take a copy of your live site for testing it on a virtual server.

The private reply form is enabled again.

Best regards
Andreas

The topic ‘[Closed] my currency switcher only works when logged in’ is closed to new replies.