Skip Navigation

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.

This topic contains 6 replies, has 2 voices.

Last updated by Bruno Kos 2 months, 1 week ago.

Assigned support staff: Bruno Kos.

Author Posts
June 6, 2022 at 2:56 am #11392093

Lucas

now I face a problem is when I received new order email. the product item name shows different language depend on the what language customer chosen.

I want my order email only show English for all information, how to do it?

June 6, 2022 at 7:52 am #11393387

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

Thank you for contacting WPML support!

That case is not possible - the language of the email will depend upon the order language, so if you translated the product and if client orders in that language, they will get that product name (along with other translated email information) in their order email.

Is this what you are asking?

Regards,
Bruno Kos

June 6, 2022 at 7:56 am #11393395

Lucas

if client orders in that language, they will get that product name (along with other translated email information) in their order email.
it's fine for client.
--------------------
I want to show only English(default) for admin order email.
now it shows English text but Chinese product name(client chosen).
some admin can't read sub-language, so I want it show English.

June 6, 2022 at 11:23 am #11395235

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

I see - what about this?
https://wpml.org/wcml-hook/wcml_new_order_admin_email_language/

Regards,
Bruno Kos

June 7, 2022 at 3:36 am #11400431

Lucas

according to my requirement, what parameter I should change in this filter?

June 7, 2022 at 9:50 am #11402301

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

In fact during the testing I found that we may have a bug here - can you check the images to confirm it is the same? I already escalated this to our developers.

Steps to reproduce are as follows:
- create a product and translate, make sure you translate the title to distinguish
- translate any New Order email text such as additional text
- create a new order in another language and check the content of the email admin got - it will have translated product title, but other texts in default site language

Regards,
Bruno Kos

translated text will remain on original.jpg
for admin product title will translate.jpg
text translations.jpg
June 9, 2022 at 6:00 am #11420183

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

After debugging we found out this to be a design choice, as some clients to prefer this to work like this (so that products are translated in these emails), so we will not change this behaviour unless more clients request this.

You could do this though - edit the file \woocommerce-multilingual\inc\class-wcml-emails.php line 484, Just after this line:

add_filter( 'woocommerce_new_order_email_allows_resend', Fns::always( true ) );

add:

add_filter( 'wcml_should_translate_order_items',  '__return_true' );

Regards,
Bruno Kos