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

cheers.

Like it.? Share it:

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

  1. guillaume

    Thanks man! Life saver, worked like a charm. Cheers!

  2. Chris

    I wish there was a function for WooCommerce 1.x that could do this -_-

  3. Chris

    Found the other post and have resolved the problem. Thank you!

  4. Ryan S