Created
July 27, 2023 06:33
-
-
Save thisissandip/ac37b3718a8c7513fa63588e5928858f to your computer and use it in GitHub Desktop.
Unhooks the WooCommerce Order emails sent to Vendors if the order is on hold
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Remove WooCommerce On Hold emails sent to Vendors */ | |
add_action( 'woocommerce_email', 'unhook_vendor_new_order_email_if_order_is_on_hold' ); | |
function unhook_vendor_new_order_email_if_order_is_on_hold( $email_class ) { | |
remove_action( 'woocommerce_order_status_pending_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