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

Last updated by garyM-10 8 months, 1 week ago.

Assigned support staff: Bruno Kos.

Author Posts
February 10, 2020 at 2:46 pm #5462615


Tell us what you are trying to do?

The below code inside a plugin was working before with WC but not working after installing WooCommerce multilingual plugin. We have to prevent processing and completed emails to customer for particular order
add_action( 'woocommerce_order_status_processing', 'test_api');

function test_api($order_id){

add_action( 'woocommerce_email', 'unhook_wph_woocommerce_customer_emails', 10, 1 );

function unhook_wph_woocommerce_customer_emails ($email_class)
remove_action( 'woocommerce_order_status_completed_notification', array( $email_class->emails['WC_Email_Customer_Completed_Order'], 'trigger' ) );

remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $email_class->emails['WC_Email_Customer_Processing_Order'], 'trigger') );

remove_action( 'woocommerce_order_status_on-hold_to_processing_notification', array( $email_class->emails['WC_Email_Customer_Processing_Order'], 'trigger') );


The above code is working without the WCML but after installing WCML, the processing and completed emails are going to customer. Please let me know how to override the WCML to work the code again.


February 12, 2020 at 7:35 am #5474657

Bruno Kos

Languages: English (English )

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


Thank you for contacting WPML support!

I see that you already talked with my colleague Laura on this ticket:

The root cause for that issue is most likely the same as here, as is the solution. Therefore, can you perhaps when setting up that website, implement this code as well so that our developers can have a look in both cases?

Bruno Kos

February 13, 2020 at 11:38 am #5485597


My issue is resolved now. Thank you!