Disable some mail notifications in Woocommerce
-
I can’t see why this code doesn’t work. I want to disable order status completed notifications for all cases except when there is a downloadable product. Help! ??
[ Moderator note: code block fixed, please use the code button going forward. ]
<?php add_action( 'woocommerce_email', 'unhook_some_emails' ); function unhook_some_emails( $email_class) { global $woocommerce, $post; $order = new WC_Order( $post->ID ); if (!$order->has_downloadable_item()) { remove_action('woocommerce_order_status_completed_notification', array(&$email_class, 'customer_completed_order')); } } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Disable some mail notifications in Woocommerce’ is closed to new replies.