Skip to content Skip to sidebar

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

Problem:
When switching from Danish to English on the site and navigating the product archive pagination, the currency changes from EUR to DKK. Refreshing the page on the second page of the product archive causes the site to revert from English to Danish.

Solution:
Ensure the "Store a language cookie to support language filtering for AJAX" option is enabled in WPML → Languages → Language filtering for AJAX operations. For more details, see Enabling language cookie to support AJAX filtering.

Client also mentioned that it may be a problem coming from "Ultimate addons for elementor" since it does work with the standard WooCommerce product archive.

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 1 reply, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 10 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
November 30, 2023 at 8:13 am #14958991

simonB-10

When i switch from danish to english language on the site, access the product archive and switch with the pagination, to page two, the currency changes from EUR to DKK.

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

I expected to see: The currency to stay the same, unless i change the language.

Instead, I got: The wrong currency on page two of the product archive. When i refresh on page two of the product archive, the site changes back from english to danish.

SCR-20231130-imzf.png
SCR-20231130-imno.png
December 1, 2023 at 9:15 am #14970275

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Simon,

Thank you for contacting the support.

I see that the theme is using AJAX operations to load that area. Can you please turn on "Store a language cookie to support language filtering for AJAX" option is checked in WPML → Languages → Language filtering for AJAX operations? See https://wpml.org/documentation/getting-started-guide/language-setup/enabling-language-cookie-to-support-ajax-filtering/ for details.

If that's already checked then before proceeding further, may I ask you to try the following?

IMPORTANT: Take full backup of your website and database beforehand. It is highly advised to try the following on a staging/dev site first, so your live website isn't compromised.

- Fix “WP Memory Limit” to at least 128MB while 256MB is recommended. See https://wpml.org/home/minimum-requirements/ for detailed information. You can set this in your wp-config.php file by adding following code:

define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Remember to add these lines before the line where it says:
/* That's all, stop editing! Happy publishing. */

- Switch to your parent theme.
- Deactivate all plugins except WPML, WCML and WooCommerce and check for the issue.
- Activate each plugin one-by-one, while keeping check on the issue after a plugin is activated. This way you'll be able to pinpoint a plugin having a conflict (or problem), if any.
- If the problem persists, repeat the above steps with a default theme of WordPress (i.e. 2021 or 2023).

Please let me know and I'll try my best to assist you further on the matter.

Regards.

December 6, 2023 at 12:41 pm #15007643

simonB-10

Hi Waqas

Thank you for your assistance and sorry for the late reply.
Unfortunately it didn't work.

I tried all of your above solutions, without luck, but it does work with the standard woocommerce product archive. But I am contacting Ultimate addons for elementor, since it seems to be an issue with their plugin.

Thank you again.