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.

This topic contains 7 replies, has 2 voices.

Last updated by Eran Helzer 1 year, 11 months ago.

Assisted by: Eran Helzer.

Author Posts
July 16, 2023 at 7:13 am #14043777

malkaS

When I switch currency, it's not working properly (only at safari, desktop and mobile). It somehow works consistently at chrome. This doesn't seem to help:

add_filter('wcml_is_cache_enabled_for_switching_currency', function($cache_enabled) {
return true;
});

July 16, 2023 at 12:04 pm #14044403

malkaS

ok, it seems at chrome it's the same issue. I've disabled the cache meanwhile, and it's working fine. But it's not a good solution...

July 17, 2023 at 10:46 am #14048357

Eran Helzer
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

When you say "it's not working properly", can you elaborate on what you mean?
Please describe to me what steps I need to take in order to replicate the issue, in as many details as you can sharing screenshots where possible.

Also, I would like to point out you do not meet WPML's minimum requirements:
- From the debug information you supplied I can see that the WordPress memory limit is set to 40MB. You should increase this to 128MB, as that is the minimum requirement for using WPML in the best way.
You can see how to do that here:
https://wpml.org/faq/checklist-before-opening-a-ticket-in-wpml-support/#how-to-increase-your-sites-memory-limit
- Your MySQL version is 5.5.5, while the minimum for WPML to work in an optimal way is 5.6. Please reach out to your provider and ask him to upgrade your MySQL server
https://wpml.org/home/minimum-requirements/

July 17, 2023 at 11:46 am #14048921

malkaS

changed limit to 256mb
enabled cache

Now it's very simple: go to any product page (hidden link), change currency, and it won't work. If it does work, go to shop page, and you'll see previous currency. From shop page get to same product, and currency will be wrong. So when cache catches something, currency isn't updated anymore.

As admin everything will work, as it's probably not cached anyway.

July 17, 2023 at 12:27 pm #14049387

Eran Helzer
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Okay, I understand.

What I see is this:
This product displays in EUR - hidden link
This product displays in USD - hidden link
The shop page displays in USD
The selected currency does not keep when moving between pages.

By the way, the currency is defined in the URL param wcmlc, so I do not think this is related to cache at all.

To conclude, there seem to be two issues here:
- Some products display EUR by default and some USD
- The currency does not stay when switching pages

I would like to request admin access to your site, in order to see if I can solve this issue quickly.
Please make sure to have a working backup of your site before proceeding.

I have set your next reply to be private so you can share credentials there.
Remember that it is always better to create a new admin user for me, then when we are done you can delete it.

July 17, 2023 at 1:41 pm #14050195

Eran Helzer
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Okay, I was mistaken before.

It seems like this issue has occurred in the past for the same reason and with the same result.

I have found the following errata, which is marked as resolved, but I see the solution here is to exclude the pages that use multicurrency:
https://wpml.org/errata/caching-plugins-may-cause-issues-with-wcml-multi-currency-settings/

Then I found the following, from some time ago, but still the same setup:
https://wpml.org/forums/topic/wcml-multi-currency-with-breeze-cache-plugin/

And finally, I found this, which could be a possible solution:
https://wpml.org/forums/topic/nitropack-and-multi-currency/

I suggest we try changing the cache plugin to one of the recommended, officially compatible ones from our directory here:
https://wpml.org/plugin-functionality/caching/

Alternatively, we can try the solution of adding the custom cookie, and then excluding the cookie from the cache, so we have the same page cached separately for each currency.
We know this is possible with NitroPack.
However, I did not see the option to do this with Breeze, so you may need to also reach out to the Breeze developers.

July 18, 2023 at 11:51 am #14058987

malkaS

I've sent it to breeze support. They promised to fix, let's see...

July 18, 2023 at 12:17 pm #14059067

Eran Helzer
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Okay, I am setting this ticket to close in two weeks. If you want to extend it, add a reply saying so.

I would also recommend you ask them to join our Go Global program and become officially compatible with WPML:
https://wpml.org/documentation/support/go-global-program/

Please update me when you have news.