Skip Navigation

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

Problem:

When using the blocks checkout, some strings are not correctly loaded in the current language.

Solution:

If you're experiencing this issue, we recommend that you first perform a full site backup. After ensuring your data is secure, upgrade to the latest versions of WordPress, WooCommerce, and WPML plugins. These updates include fixes that might resolve the language loading issue in the blocks checkout.

Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

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

Last updated by Marco 1 month ago.

Assisted by: Bigul.

Author Posts
April 17, 2024 at 1:57 pm #15532794

Marco

Hi,

When using the blocks checkout some strings are not correctly loaded in the current language.

April 17, 2024 at 2:53 pm #15533594

Marco

As asked by support, I've installed a very simple example on the sandbox provided by you.

If you checkout in Portuguese you'll see that some strings are translated and others are not, but all of them are in fact loaded correctly if you disable WPML and set the website to Portuguese.

Just add a product to the cart and go to hidden link

Details of the problem:

- All strings that are part of the blocks and come from Javascript/JSON files are correctly loaded in Portuguese (for example: "Morada de facturação" hidden link )

- The strings that are incorrectly loaded in English are the one that the block reads from PHP, for example, all strings here: hidden link (for example "First name" hidden link )

- If WPML is disabled and the website is set to Portuguese, all strings are correctly loaded from PO and JSON files. It should be the same with WPML.

- It should NOT be necessary to scan the plugin into the WPML strings database. It should load correctly from the translation files loaded from wordpress.org automatically. This needs to be fixed to work from the PO/JSON files, not being necessary to fill the database with almost 9000 strings. (I did tried it and the result is exactly the same)

- I suspect this his related by the fact these blocks are loaded via the REST API and maybe WPML is not "short circuiting" correctly in that situation to "tell" WordPress he is running in Portuguese and not English on that specific call.

Screenshot 2024-04-17 at 15.49.35.png
April 18, 2024 at 10:55 am #15537641

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hi Marco,

Thank you for reproducing the issue on the sandbox site. We will debug it further and get back to you as soon as possible. Please wait.

--
Thanks!

Bigul

April 19, 2024 at 1:26 pm #15543890

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hi Marco,

The ticket is escalated to our developers for further debugging. We will get back to you soon when we have an update from our developers. Please wait.

--
Thanks!

Bigul

April 19, 2024 at 1:37 pm #15544027

Marco

👍

April 19, 2024 at 4:37 pm #15544712

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hi Marco,

Thank you for the updates. Please wait.

--
Thanks!

Bigul

December 11, 2024 at 11:41 am #16503081

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hi Marco,

Sorry for the very late response. Please upgrade to the latest version of WordPress, WooCommerce, and WPML plugins after a full site backup {mandatory}. Then make sure the bug exists or not. Because the latest versions include the fix for this.

--
Thanks!

Bigul

December 11, 2024 at 12:22 pm #16503372

Marco

I can confirm this is fixed. Thanks.