Woocommerce 2.x: disable email notification upon order status update

Woocommerce 2.0 was a major upgrade. I had to relook at the email library to figure things out. To disable email notification upon order completion, add the following code to your functions.php

 * Remove order status notification upon completion. Feel free to remove other notification hooks here as well.
 * Good to customise the way you send email. Too many emails to a person in a short time might blacklist your email server.
 * @param  WC_Emails $wc_emails email class
 * @return null
function do_not_send_some_email_notifications(WC_Emails $wc_emails) {
  remove_action('woocommerce_order_status_completed_notification', array($wc_emails->emails['WC_Email_Customer_Completed_Order'], 'trigger'));
add_action('woocommerce_email', 'do_not_send_some_email_notifications');

Note that this code does not work in woocommerce 1.x


Author: bpeh

Bernard Peh is a great passioner of web technologies and one of the co-founder of Sitecritic.net Website Design and Reviews. He works with experienced web designers and developers everyday, developing and designing commercial websites. He specialises mainly in SEO and PHP programming.

4 thoughts on “Woocommerce 2.x: disable email notification upon order status update”

Comments are closed.