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.
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+02:00)
Tagged: WCML
Related documentation:
This topic contains 13 replies, has 0 voices.
Last updated by Marcel 3 days, 7 hours ago.
Assisted by: Marcel.
Author | Posts |
---|---|
September 19, 2025 at 4:25 am | |
xavierC-5 |
Background of the issue: Symptoms: Questions: |
September 19, 2025 at 6:54 am #17415442 | |
Shekhar Bhandari WPML Supporter since 03/2015
Languages: English (English ) Timezone: Asia/Kathmandu (GMT+05:45) |
Hello, 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. Thank you, |
September 19, 2025 at 7:20 am #17415460 | |
xavierC-5 |
ok, thanks Shekhar. |
September 23, 2025 at 3:15 am #17423466 | |
xavierC-5 |
Hi Shekhar, Do you have any news about this issue? Regards, |
September 23, 2025 at 3:26 pm #17426232 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (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. Best regards, |
September 24, 2025 at 4:18 am #17427302 | |
xavierC-5 |
Hola Marcel, Looking forward to hearing from you. |
September 26, 2025 at 2:15 pm #17436345 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, 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: 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. Thank you! Best regards, |
September 29, 2025 at 4:57 am #17439404 | |
xavierC-5 |
Hi Marcel, Thanks for the feedback. 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. Let me know. |
September 29, 2025 at 9:49 am #17440382 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, Yes, we used the copy for local testing and now need permission to apply the change on the live website. Best regards, |
September 30, 2025 at 4:36 am #17442540 | |
xavierC-5 |
Hi Marcel, 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? Best, 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. |
September 30, 2025 at 9:12 am #17443372 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Thanks! Yes, the credentials we have here in this ticket are still working. Best Regards, |
September 30, 2025 at 10:49 am #17443940 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
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. Best regards, |
October 1, 2025 at 6:27 am #17447211 | |
xavierC-5 |
Hi Marcel, 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. Let me know. |
October 1, 2025 at 7:13 am #17447327 | |
Marcel Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, sure! 1) Please make a backup. 2) Modify the function get_current_url in woocommerce-multilingual/inc/class-wcml-cart-switch-lang-functions.php, completely replacing it with this: public function get_current_url() { /* phpcs:ignore WordPress.CSRF.NonceVerification.NoNonceVerification, WordPress.VIP.SuperGlobalInputUsage.AccessDetected, WordPress.VIP.ValidatedSanitizedInput.InputNotValidated, WordPress.VIP.ValidatedSanitizedInput.MissingUnslash */ $scheme = is_ssl() ? 'https' : 'http'; $host = $_SERVER['HTTP_HOST'] ?? parse_url( home_url(), PHP_URL_HOST ); $uri = $_SERVER['REQUEST_URI'] ?? '/'; // already includes the query string if present return esc_url_raw( $scheme . '://' . $host . $uri ); } 3) Test if this works for you. Best Regards, |