Skip Navigation

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

Problem:
The client is experiencing issues with the currency switcher on their website. The currency switcher does not work on the homepage and behaves unpredictably when changing languages or navigating different pages like cart, checkout, about, and home, especially when a performance plugin with cache is enabled.
Solution:
1. Verify that the website is accessible and loading correctly. If not, check with the hosting provider.
2. Flush the cache memory and temporarily deactivate the cache plugin to see if the issue with the currency switcher persists.
3. Ensure that the WordPress memory limit is sufficient. It is recommended to set it to at least 128M. This can be done by adding the following line to the wp-config.php file:

/* Memory Limit */<br />define('WP_MEMORY_LIMIT', '128M');

Place it above the line /* That's all, stop editing! Happy blogging. */.
4. If the issue disappears when the Breeze cache plugin is disabled, consider switching to a cache plugin that is compatible with WPML, such as LiteSpeed Cache.

If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

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.

This topic contains 9 replies, has 1 voice.

Last updated by Carlos Rojas 1 week, 3 days ago.

Assisted by: Carlos Rojas.

Author Posts
November 26, 2024 at 5:21 am #16442483

giorgioF-8

Background of the issue:
I want to change/switch currency manually using the currency switcher dropdown on my site. The issue can be seen at hidden link.

Symptoms:
The currency switcher doesn’t work on the homepage. The currency changes unpredictably with language change, and different pages like cart, checkout, about, and home show different currencies unpredictably when I install any performance plugin with cache.

Questions:
Why does the currency switcher not work on the homepage?
Why does the currency change unpredictably with language change?
Why do different pages show different currencies when a performance plugin with cache is installed?

November 27, 2024 at 8:09 pm #16451583

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

One of my colleagues is going to take on your ticket. In the meantime, I would like to provide some helpful information.

I have tried to check your website, but it doesn't work. It is not associable.

We can't connect to the server at nuragesports.com.

The cache plugins probably cache the homepage, which could explain why the switcher doesn't work correctly. The other pages you mentioned are most likely not cached, so the currency switcher will work as expected.

December 2, 2024 at 6:39 pm #16468111

giorgioF-8

So then how can I use currency switcher along with cache plugin?

December 3, 2024 at 1:58 pm #16472238

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hello,
My name is Carlos and I will continue working on this ticket

1.- As my colleague explained, the site is not loading so we can't reproduce the issue. Could you check with your hosting providers why the site is not loading?

2.- Does the issue persist if you flush the cache memory and then deactivate the cache plugin?

3.- Please increase the WP memory Limit. Minimum requirements are 128Mb: https://wpml.org/home/minimum-requirements/
You can add this to wp-config.php to increase WP memory:`

/* Memory Limit */
define('WP_MEMORY_LIMIT', '128M');

- Add it above the line /* That's all, stop editing! Happy blogging. */

You can double-check the WordPress memory limit in WPML -> Support

Kind regards,
Carlos

December 4, 2024 at 5:31 am #16474330

giorgioF-8

1. Website link was wrong with a typo. visit: hidden link
2. No, It works fine if we disable cache plugin but I need to use cache plugin to improve my site performance.
3. Memory limit 1000M.

December 4, 2024 at 8:54 am #16475126

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hi there,

1.- Ok, I was able to see the site this time

2.- Could you tell me what is the cache plugin used on the site?

3.- The PHP memory limit is 1023M, which is correct, however the steps I described were to increase the WordPress memory limit. You can double-check the WordPress memory limit in WPML -> Support

December 5, 2024 at 7:03 am #16479356

giorgioF-8

1. WP memery is also 1023 I guess.
2. The cache plugin is breeze from cloudways

December 5, 2024 at 10:27 am #16480904

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Thank you for your message.

1.- Please go to WPML -> Suppor and confirm the WordPress memory limit

2.- Does the issue disappear if you disable Breeze?

December 7, 2024 at 5:58 am #16488056

giorgioF-8

Memory is ok with green, checked
Yes issue disappear if disable breeze plugin

December 9, 2024 at 11:32 am #16492447

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hi there,

In this case I recommend you using a compatible cache plugin like https://wpml.org/plugin/litespeed-cache/