Background of the issue:
I am trying to switch languages on my website when there are items in the cart. The issue can be seen on this page: hidden link.
Symptoms:
I expected to see a prompt for confirmation before the cart resets. Instead, no prompt appears before the cart resets. After the cart resets, if I do not back to the Shop page and I switch languages, the prompt notice appears but redirects to a wrong URL. Additionally, the removed items notice stays on the screen and cannot be removed.
Questions:
Why does the prompt not appear before the cart resets when switching languages?
Why does the prompt notice redirect to a wrong URL after the cart resets?
How can I remove the notice about removed items from the screen?
I have escalated the issue of incorrect URL redirections to our second-tier supporters. You will receive feedback or updates as soon as your second-tier checks the issue.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: Europe/Vienna (GMT+02:00)
Hi Xavier,
My name is Marcel, and I’ll be handling your ticket while my colleague Shekhar is away.
Our 2nd Tier team is currently investigating the issue. I’ll keep you updated as soon as we have feedback. It looks like there were some difficulties in replicating the problem.
our 2nd Tier team has reviewed your case and determined that a modification to get_current_url is required. This involves replacing the code in:
woocommerce-multilingual/inc/class-wcml-cart-switch-lang-functions.php
Before proceeding, I’d like to confirm whether we have your permission to apply this change. If so, please ensure a backup is created beforehand and let us know once it has been completed.
About replacing the code on the website; I've already made a full backup but I believe you are accessing to a copy of the website.
When discussing with Shekhar, he told me, he was unable to reproduce the same issue on your staging site (environment) so he asked me to send him a full backup (copy) of the current multisite. I believe that if you are using that copy it won't affect the live site. Please correct me if I'm wrong.
Or you are now asking permission to make the changes on our live site?
On the Live Multisite, I did add a Staging subsite to replicate the same error/issue as on the live subsite for testing purpose. Can you apply the changes first on that staging subsite to check that works well before applying it on the live/performance subsite?
Do these changes work independently for each subsite or should be applied for the whole multisite? As the problem is only affecting one of the subsites at this moment.
Best,
Xavier
PS: please let me know if you still have full access to the whole multisite. I remember I granted to Shekhar so should still work.
Just to clarify: On a WordPress Multisite installation, all subsites share the same plugin files. That means there isn’t a separate version of WooCommerce Multilingual (WCML) running on each subsite—if we edit the plugin code, those changes would apply to every subsite where the plugin is active.
In that case, as 2 of the subsites are live and customers are actively using them to buy products, I'm a bit worry about applying these changes when I cannot supervise it due to zone time difference.
Is it possible to explain me what changes need to be done, so I can do it? I can test and in case it fails I can always use the backup to restablish the multisite.