Resolved

Reported for: WPML String Translation 2.4.2

Resolved in: WPML String Translation 2.4.2.1

Symptoms

When using WooCommerce Multilingual 3.8.6 with WPML 3.5.3 some errors are being displayed (or logged) on the order confirmation page, after placing an order in  a secondary language.

The error message is similar to the one below:

PHP Notice: Undefined index: order-received in ../wp-content/plugins/woocommerce-multilingual/inc/class-wcml-endpoints.php on line 155

In addition to the error message, instead of the ‘Order Received’ page with the order details, users are being shown the translated ‘Checkout’ page without any content.

Empty "Checkout' page
Empty “Checkout’ page in German

 

Despite the fact that the orders are, however, fulfilled and notification emails being sent, the clients could get confused and think that the order didn’t go through and send duplicate orders.

We’ve found out that this comes from a change in WPML String Translation 2.4.2.  A fix is already on the way but we need to test it well before we release an update.

 

 

Workaround

A way to fix this is to use the beta version 2.4.2.1-b1 for WPML String Translation. It addresses only this particular issue and should not have an impact on anything else. It is, however, a beta version so caution is recommended: backup your site and preferable test it first on a non-production environment.

There is another possible workaround that you can use temporarily and which should not affect the user experience by too much. This workaround involves marking the string corresponding to the ‘order-received’ endpoint as not translate it. You don’t need to delete the string but just untick the ‘translation is complete’ checkbox. Here are the steps for a case when you have English as the default language. The steps are identical if your site uses a different default language.

  1. Go to WPML -> String Translation
  2. Search for ‘order-received’ or navigate to the ‘WooCommerce Endpoints’ domain and find the ‘order-received’ string.
  3. Expand the ‘translations’ section for the ‘order-received’ string
  4. Uncheck the ‘Translation is complete’ checkbox and click ‘Save’ for all languages
Mark the 'order-received' endpoint as not translated
Mark the ‘order-received’ endpoint as not translated

After this, your ‘Order Received’ page will still be translated. It’s just that the endpoint string in the url will not be translated.

 

6 Responses to “Errors on the order confirmation page when using WooCommerce Multilingual”

  1. Thank you for looking in to it!

    I can confirm that the problem is solved with the beta.

    One remark to your description of the problem: The orders did not go through – I only receive the “cancelled order” e-mail after a while, the customer did not receive anything and was not directed to the payment.

    I am happy with using the beta for now 🙂

    Thank you

    • Thank you for the feedback. Just to let you know, we’re not happy about having caused this problem and we’re taking steps to avoid it in the future. We’ve added tests for the entire WooCommerce checkout process (from selecting a product until the “thank you” page) to WPML’s QA plan. Hopefully, next updates for WPML will not be able to break basic functionality in WooCommerce Multilingual.

  2. What to do if your confirmation page is empty but there were no translations for “order-received” to be unchecked (so the workaround is not working for me)?

    • Hi Jurgen

      Maybe, in your case, it’s a different bug. Have you tried opening a support ticket and describe the problem that you are seeing?