Skip Navigation

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

Problem:
You are trying to translate WooCommerce system emails into German and English. However, with WooCommerce Multilingual enabled, all emails are sent in English only. Disabling WooCommerce Multilingual results in emails being sent in the correct language.
Solution:
We released WPML String Translation 3.2.16, which is expected to address this issue. Please ensure that you have the latest versions of all relevant plugins and themes.

If this solution does not resolve your issue or seems outdated, we encourage you to check the related known issues and verify the version of the permanent fix. If problems persist, 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 13 replies, has 1 voice.

Last updated by Andrey 1 week, 1 day ago.

Assisted by: Andrey.

Author Posts
November 21, 2024 at 4:05 pm #16430142

adrianM-2

Background of the issue:
I am trying to translate the WooCommerce system into two languages: German and English. I expected to see emails in German from the German URL or backend.

Symptoms:
Woocommerce emails are always in English with WooCommerce Multilingual enabled. With WooCommerce Multilingual disabled, emails are correct again.

Questions:
Why are WooCommerce emails always in English when WooCommerce Multilingual is enabled?
How can I ensure emails are sent in German from the German URL or backend?

November 21, 2024 at 4:06 pm #16430146

adrianM-2

Of course this worked with WordPress < 6.7

Okay, "WPML String Translation" seems to be the problem -> it is working, when I disable this plugin.

November 21, 2024 at 10:14 pm #16431247

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

I apologize for the trouble you encountered. We are aware of this issue and it will be addressed in the next release.

In the meantime, could you please try the following steps:

1. Go to WPML → Theme and Plugins Localization.
2. Deactivate the option "Automatically load the theme's .mo file using 'load_textdomain.'"

Let me know if this resolves the problem.

November 22, 2024 at 6:48 am #16431911

adrianM-2

Hello Andrey,

Thank you for your support.

Unfortunately, this option is already deactivated 😐

November 22, 2024 at 2:17 pm #16434197

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

I am sorry to hear this. Can you try the following fix after a full backup?

1. Open file /wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LoadTextDomain.php

2. Add the line at the beginning of the file

use WPML\LIB\WP\WordPress;

just before

use WPML\ST\MO\File\Manager;

3. On line 38, change this

$this->reloadAlreadyLoadedMOFiles();

to this

		if ( WordPress::versionCompare( '>', '6.6.999' ) ) {
			add_action( 'init', function() {
				$this->reloadAlreadyLoadedMOFiles();
			}, 0 );
		} else {
			$this->reloadAlreadyLoadedMOFiles();
		}

4. Save it.

November 25, 2024 at 8:37 am #16438222

adrianM-2

Hello Andrey,

Is still does not work.

Thanks for your support.

November 25, 2024 at 2:34 pm #16440412

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you for your feedback. Please upload any relevant screenshots or links that illustrate the problem. I want to ensure that I understand the same issue so that I can provide the best possible solution.

November 25, 2024 at 3:11 pm #16440739

adrianM-2

Can I send you a backup?

I've created a local backup of the production system to replicate the issue...

November 25, 2024 at 3:15 pm #16440747

adrianM-2

I'm using the "Send order details to customer" to resend any mails...

You can also see, that the backend is in English, but should be German?

Bild_2024-11-25_161514056.png
Bild_2024-11-25_161426794.png
Bild_2024-11-25_161323457.png
November 25, 2024 at 4:03 pm #16441123

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

You can also see that the backend is in English, but should be German?

Are you sure that you have tested the workaround I sent before? A few users reported that it helped. The important thing is that WooCommerce Multilingual plugin is not installed, which could also explain why the emails are still not working.

Please do the following steps:

1. Install WooCommerce Multilingual plugin

2. Apply this fix https://wpml.org/forums/topic/woocommerce-emails-are-always-in-english-with-woocommerce-multilingual-enabled/#post-16434197

November 25, 2024 at 4:25 pm #16441229

adrianM-2

Hi Andrey,

Seems to be working now, with WooCommerce Multilingual 👍

I've reduced the local system to a bare minimum to replicate the issue...
We have it installed in the live system.

Maybe WPML should just remember that WooCommerce Multilingual is required

Thanks a lot

Adrian

November 25, 2024 at 4:43 pm #16441320

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you, Adrian. I'm glad to hear that it works. However, this information is not indicated on the plugin's page, however we have highlighted it in our documentation. Thank you for your suggestion. Have a nice week!

November 26, 2024 at 8:13 am #16442997

adrianM-2

Hello Andrey,

Just to let you know, the patch is still not working in our production system 🙈

I tried to find another "broken" plugin, but my local dev is okay now.

But this is okay for now, we will wait for the bugfix release...

Thanks

Adrian

November 26, 2024 at 1:25 pm #16445070

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you, Adrian. WPML String Translation plugin should be released shortly. I appreciate your patience.