Skip Navigation

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

Problem: WooCommerce sending only 1 email if WPML is active (not respecting multiple Recipient(s) for any order email) Solution: Upgrade WooCommerce multilingual

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

Last updated by Bruno Kos 7 months, 3 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
February 12, 2021 at 7:49 am #8068149

davidN-51

Hello,

We noticed after updating the WPML Translation Management plugin (2.10.5) the secondary email address we add for admin emails in “receipients” (in the email settings) no longer receives an email. Only the first admin email address in the list receives the emails ("new order" email to be specific).

This is a major problem for us on our live site as we need 2 people to receive these emails so orders can be worked on.

I have located the issue to the WPML Translation Management plugin. If we disable this plugin the problem goes away. We really need a fix for this WPML bug ASAP.

Thank you

February 14, 2021 at 11:38 am #8080063

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

Thank you for contacting WPML support!

I tested this on my localhost and can confirm this to be a case.

This is escalated to our 2nd tier team and may take some debugging time, I'll get back to you as soon as I have any news or questions for you.

Regards,
Bruno Kos

error.jpg
February 14, 2021 at 12:14 pm #8080251

davidN-51

Many thanks Bruno. We hope the bug can be resolved and an update available ASAP.

February 15, 2021 at 10:09 am #8085419

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

This is caused by a filter introduced in WooCommerce 5.0.0 -> woocommerce_new_order_email_allows_resend to be specific.

We have a workaround (before this is resolved permanently by our devs):
- go to wp-content/plugins/woocommerce-multilingual/inc/class-wcml-emails.php
- Add this code around line 468 in the method: \WCML_Emails::new_order_admin_email

add_filter( 'woocommerce_new_order_email_allows_resend', '__return_true' );

So that it's like:

				$admin_language = $this->get_admin_language_by_email( $recipient, $order_id );
				add_filter( 'woocommerce_new_order_email_allows_resend', '__return_true' );
				$this->change_email_language( $admin_language );

Regards,
Bruno Kos

February 15, 2021 at 10:23 am #8085773

davidN-51

Hi Bruno - many thanks.

Will that same file be overwritten with the next update, with a permanent fix for this?
I do not really like editing files, unless I know you will update the same file on the next release.

February 15, 2021 at 10:56 am #8086261

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

I am quite sure that this issue will be resolved promptly by our developers, because it can potentially affect a number of our customers.

However your only solution for now is to modify WooCommerce multilingual directly and then follow-up here: https://wpml.org/download/woocommerce-multilingual/?section=changelog

So once you see the new version of WooCommerce multilingual available, open the above page and check the changelog to find out whether the solution has been implemented in the latest version.

If not, then keep the current modified version.

Regards,
Bruno Kos

February 15, 2021 at 12:26 pm #8087171

davidN-51

Great many thanks. Our test using this file update seems to have resolved the issue 🙂

February 15, 2021 at 12:54 pm #8087553

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

Great - also, we will have an errata about this issue published here soon https://wpml.org/known-issues/.

In any case hopefully it will be fixed in one of the next minor WCML releases as a hotfix.

Regards,
Bruno Kos

March 4, 2021 at 8:05 am #8224811

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

I am just letting you know that this is fixed in WCML 4.11.3.

Regards,
Bruno Kos