Skip Navigation

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

Problem:
If you're completing a checkout in a secondary language and using Stripe as the payment method, you might be redirected to an incorrect 'thank you' page. The URL lacks the language parameter, leading you to the primary language's checkout page instead of the secondary language's 'order-received' endpoint.
Solution:
We recommend downgrading the String Translation Plugin to version 3.2.6 or WCML to version 5.2.1 as a temporary solution. You can download these versions from your WPML account. Additionally, we have a workaround that involves updating WooCommerce Multilingual to the latest version and following the steps provided in our Errata page:

Please note that a permanent fix will be included in a future update of the WooCommerce Multilingual plugin.

If this solution doesn't seem relevant to your situation, please open a new support ticket with us.

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 14 replies, has 2 voices.

Last updated by Prosenjit Barman 1 year, 6 months ago.

Assisted by: Prosenjit Barman.

Author Posts
November 22, 2023 at 10:21 am #14895565

Angeloca

When I finish the checkout in the secondary language (english) and I choose Stripe (the official woocommerce add-on) as payment method, I'm getting redirected on the wrong thank you page:

```
hidden link
```

But the url is missing the `/en/` language parameter, `cassa` is the checkout page page in the primary language, but `order-received` is the endpoint in the secondary language.

Correct url should be:

```
hidden link
```

November 24, 2023 at 11:41 am #14916541

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

Apologies for the delayed response. We are currently dealing with a slightly higher volume of tickets than usual, which is the main reason for the delay. Rest assured, we are doing our best to reduce the response time while ensuring that each ticket receives an efficient and thorough reply.

I understand the issue you're having. Since the "Thank You" page is dependent on the "order-received" endpoint, please make sure that the endpoint has been translated correctly in the "WooCommerce > WooCommerce Multilingual > Stores URLs" tab.

Please check this guide for more information: https://wpml.org/documentation/related-projects/woocommerce-multilingual/#urls

Let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

November 24, 2023 at 11:44 am #14916547

Angeloca

Hi Prosenjit, thank you for your answer.

The endpoints have been correctly translated already...

Please note, as stated in my first message, the issue is not with the endpoint, which is correct, but with the page slug (which is in primary language instead of secondary) and with the language parameter /en/ which is missing from the URL.

November 27, 2023 at 3:21 am #14926193

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

Thank you for the clarification. As the issue persists, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

November 28, 2023 at 10:34 am #14937695

Angeloca

Hi Prosenjit, we do not have FTP on our current production enviroment, and the staging is behind a proxy and needs a vpn to access it.

I can give access to production w/o FTP or you can access staging with vpn (I'm gonna need to send a openvpn config file). Let me know.

November 29, 2023 at 3:57 am #14945985

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,

We usually prefer access to a staging site, but given the additional VPN configuration needed to access your Staging site, it would be more convenient if you could provide access to your Production site instead. Please make sure to take a full backup of the site including the database. There's no need for FTP Access, as we can use a File Manager plugin if necessary.

Before I begin work on the Production site, I'd like to inquire if activating the 'Cash on Delivery' or 'Cheque Payment' methods is acceptable. Since the issue occurs on the Order Completed page, testing might require enabling an alternative payment gateway.

Additionally, could you please also provide test card details? This will allow me to complete the checkout process using that card information.

I have enabled the private fields for you to securely share the access information. Looking forward to your response.

Best regards,
Prosenjit

December 1, 2023 at 7:06 am #14969087

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for sharing the access information.

The account you've shared seems to lack the necessary permissions to access areas such as Plugins, Theme, and WooCommerce Status. I believe the issue might be caused by a plugin conflict, but since I don't have access to the plugin section, I'm unable to conduct further testing. Could you please assign full privileges to the account so that I can investigate the issue without any restrictions?

Looking forward to your response.

Best regards,
Prosenjit

December 4, 2023 at 10:00 am #14984345

Angeloca

Hi Prosenjit,
I've upgraded your capabilities to superadmin.

Please cleanup after you're finished because you left stripe test mode active last time 🙂 Thanks!

December 5, 2023 at 4:15 am #14992611

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the update.

After a detailed examination, I was able to replicate the issue in my development environment. Upon clicking the checkout button, the system redirects to the default checkout page. However, if the order-received endpoint is translated, this redirection leads to a "Not Found"/404 page.

This problem seems to occur specifically when the WooCommerce checkout page is built using `Shortcode` or the "Classic Checkout" Block. I have escalated this issue to our development team for further analysis. Rest assured, I will keep you updated with any new developments.

For the time being, I recommend adding the default Checkout block on the checkout page instead of the "Classic Checkout" block or Shortcode. For guidance on how to do this, please refer to this video: hidden link.

Let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards
Prosenjit

December 5, 2023 at 9:47 am #14995041

Angeloca

Hi Prosenjit, we have not yet upgraded to the checkout block, will do after the Christmas shopping spree 🙂

I've found that if I do not translate the order completed endpoint, the user get redirected to the wrong language, but at least will not get a 404 error.

Let me know when the dev team answer 🙂

best

December 6, 2023 at 4:53 am #15003779

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for the update.

Our development team is currently investigating the issue. Meanwhile, we've discovered that downgrading either the String Translation Plugin to version 3.2.6 or WCML to version 5.2.1 can resolve the problem.

If you need the order-received page to appear in a different language, consider downgrading either the String Translation plugin or the WCML plugin to the specified versions. These previous versions can be downloaded from your WPML account(Screenshot: hidden link).

I will surely let you know as soon as I have more information on this issue.

Best regards,
Prosenjit

December 6, 2023 at 4:15 pm #15010067

Angeloca

Hi Prosenjit,
thank you for the suggestion, I'll check the changelog

December 7, 2023 at 9:32 am #15014873

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,

I have another update for you. Our development team has explored the issue and identified a Workaround. Please implement the workaround detailed in the Errata provided below and see if you're getting the desired outcome. However, before proceeding, ensure that WooCommerce Multilingual is updated to the latest version.

- https://wpml.org/errata/wcml-custom-order-received-endpoint-redirects-to-default-language/

Please be assured that the fix will be incorporated into a future version of the WooCommerce Multilingual plugin.

Best regards,
Prosenjit

December 8, 2023 at 9:15 am #15023679

Angeloca

Hi Projsenjit, the workaround works 🙂

December 11, 2023 at 3:37 am #15032729

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

Glad to hear that the workaround works!

We are trying our best to include the fix in the next update of the WooCommerce Multilingual plugin. Till then, please continue using this workaround.

Feel free to let me know if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit