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.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Madrid (GMT+01:00)

This topic contains 1 reply, has 0 voices.

Last updated by Marcel 17 hours, 22 minutes ago.

Assisted by: Marcel.

Author Posts
November 20, 2024 at 2:02 pm #16424895

jamesF-27

Background of the issue:
I want to switch currency using the currency switcher. We managed to fix the behavior on our staging site by updating `wp-content/plugins/woocommerce-multilingual/res/js/wcml-multi-currency.js` with the following code:

const url = wcml_maybe_adjust_widget_price(target_location, response.data); if (url !== target_location) { window.location = url; } else { window.location.reload(); }

Symptoms:
The page reloads and resets to the top of the page after selecting a currency.

standard behaviour before applying the fix:
hidden link

after applying the fix above:
hidden link

Questions:
How can I ensure the page reloads with the new currency and returns to the same position?
Is there a way to apply the fix without modifying your plugin sources? Is there a chance you could include that in future plugin release?

November 25, 2024 at 4:13 pm #16441133

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

Could you check if this issue can be reproduced in a staging environment set up as isolated, with only WPML, WooCommerce, and WooCommerce Multilingual active, and using a default theme like Storefront?

Let me know the results.

Best regards,
Marcel