Skip to content
Advertisement

WooCommerce: Add Custom order statuses with custom email notifications

Using Add a new order status that Send an email notification in WooCommerce 4+ answer code, I have been able to get an email notification for ONE custom status however cannot get my head around how I would go about being able to send the email notification for BOTH custom statuses.

See below the example codes & The code I have tried for multiple custom status email notification. I have also included my FULL code which shows the entire process of creating the multiple statuses.

Would love some help on this quick fix!

Also, As for the email BODY – Is there any possibility of changing what the Processing Order content says through this code without having to create a new email template?

WORKING – Single Custom Status email notification “Shipped”

JavaScript

ATTEMPTED/NOT WORKING – Email notification for BOTH custom statuses

JavaScript

FULL CODE WITH WORKING MAIL FOR SINGLE CUSTOM STATUS. This shows my full process of adding custom statuses with bulk actions and action buttons – All working fine.

JavaScript

Advertisement

Answer

There are some mistakes… For multiple order statuses with custom email notifications use the following complete code (removing before all your related code):

JavaScript

Code goes in functions.php file of the active child theme (or active theme). Tested and works.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement