Skip to content

Instantly share code, notes, and snippets.

@madeincosmos
Created August 14, 2020 10:48
Show Gist options
  • Save madeincosmos/edb553011fc0ba8ff42e43fd0bcb6f8f to your computer and use it in GitHub Desktop.
Save madeincosmos/edb553011fc0ba8ff42e43fd0bcb6f8f to your computer and use it in GitHub Desktop.
Unhook Product Vendor emails from On-Hold status
add_action( 'woocommerce_email', 'unhook_vendor_emails_on_hold_status' );
function unhook_vendor_emails_on_hold_status( $email_class ) {
remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $email_class->emails['WC_Product_Vendors_Order_Email_To_Vendor'], 'trigger' ) );
remove_action( 'woocommerce_order_status_failed_to_on-hold_notification', array( $email_class->emails['WC_Product_Vendors_Order_Email_To_Vendor'], 'trigger' ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment