This thread is resolved. Here is a description of the problem and solution.
Problem:
If I place order in primary language, thank you page is displayed correctly. However if I place order in secondary language, it redirects me to cart page instead of thank you page. the issue related the endpoint not being translated correctly
Solution:
It is a known issue : https://wpml.org/errata/incorrect-content-displayed-when-woocommerce-endpoints-are-translated-from-non-english-to-english/
Relevant Documentation:
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: Documentation request
This topic contains 10 replies, has 2 voices.
Last updated by olgar-4 1 year, 7 months ago.
Assisted by: Ilyes.
Author | Posts |
---|---|
May 16, 2023 at 2:40 pm | |
olgar-4 |
Hi, I have problem with woocommerce wpml extension. If I place order in primary language, thank you page is displayed correctly. However if I place order in secondary language, it redirects me to cart page instead of thank you page. Can you please help me to resolve this? |
May 16, 2023 at 3:38 pm | |
May 16, 2023 at 3:41 pm #13657883 | |
olgar-4 |
Ok, how should I proceed to copy site to your servers? |
May 16, 2023 at 3:51 pm #13657971 | |
Ilyes Supporter
Languages: French (Français ) Timezone: Pacific/Easter (GMT-05:00) |
Hello again, In order to see if this issue is happening because of the configuration of your site, or just the combination of your plugins/theme & WPML we need to isolate the issue. I’ve created a sandbox here: hidden link I’ve already configured WPML in 2 languages. Please do the following: - Open the Sandbox link mentioned above - Download and Activate your theme - Download and activate Woocommerce and any plugin you see necessary. - Create a basic product and translate it - Try adding the product to your cart in second language - Add any step you see fit to replicate the issue and share the results with me Please note that we only need the theme/plugin and the related functionality, you don’t need to set up an entire website or clone your existing site. https://wpml.org/faq/how-to-reproduce-issues-and-share-them-with-wpml-support/ Let me know when it is done. Best regards, |
May 16, 2023 at 4:55 pm #13658305 | |
olgar-4 |
I tried to replicate the issue on your sanbox, but without any luck. I experimented further on my staging site, trying to disable ALL plugins and enable them again, also updated woocomerce, swithed to different theme and the issue still persists. This leads me to conclusion that there is a problem with wpml configuration. As I cannot export the wpml config and import it to sandbox, there is no easy way to replicate this. I could spend tens of hours with simulating similar behavior. Can you please examine the problem on my staging site? I can do full backup before you proceed, so If you break anything, it doesn't matter. Thank you very much. |
May 17, 2023 at 8:30 am #13662135 | |
Ilyes Supporter
Languages: French (Français ) Timezone: Pacific/Easter (GMT-05:00) |
Hello, It could be hard to investigate an issue that is not clear to replicate. Not replicating it means that this is a unique case related to how your site is built, an issue with how you translated it, or an issue with the server configuration. I will check with our team to see if we can find something obvious that might be causing this. Your patience is appreciated! Best, |
May 17, 2023 at 10:12 am #13663215 | |
olgar-4 |
Hi, Thanks a lot. |
May 17, 2023 at 11:28 am #13663609 | |
olgar-4 |
I found where is the problem. It is in slug translation of thank you page. In default language CZ I have "objednavka-prijata". This is also set in woocommerce advanced setup - endpoints. However if I translate this slug to secondary language "order-received" in WPML store urls translation, the error appears. If I keep same slug for both CZ and EN "objednavka-prijata", the everything works fine. |
May 17, 2023 at 11:47 am #13663781 | |
olgar-4 |
So can you please look into this? Thanks. |
May 17, 2023 at 2:43 pm #13665303 | |
Ilyes Supporter
Languages: French (Français ) Timezone: Pacific/Easter (GMT-05:00) |
Hello, I have found out that we have a similar case that we already escalated, and here is the workaround : https://wpml.org/errata/incorrect-content-displayed-when-woocommerce-endpoints-are-translated-from-non-english-to-english/ It seems to be working fine now, I have done the following to make it work : 1- Deleted the original objednavka-prijata string from WPML > String translation The trick is to use English as the default language for those endpoints and translate them from English to secondary language through WPML > String translation Best, |
May 17, 2023 at 2:53 pm #13665381 | |
olgar-4 |
It works perfectly! Thanks a lot! |