It would be nice to have the option to exclude some emails to be sent to vendors when specific status are triggered.
on the file class-wc-product-vendors-order-email-to-vendor.php
please consider replace this:
add_action( ‘woocommerce_order_status_pending_to_processing_notification’, array( $this, ‘trigger’ ) );
add_action( ‘woocommerce_order_status_on-hold_to_processing_notification’, array( $this, ‘trigger’ ) );
add_action( ‘woocommerce_order_status_pending_to_completed_notification’, array( $this, ‘trigger’ ) );
add_action( ‘woocommerce_order_status_pending_to_on-hold_notification’, array( $this, ‘trigger’ ) );
add_action( ‘woocommerce_order_status_failed_to_processing_notification’, array( $this, ‘trigger’ ) );
add_action( ‘woocommerce_order_status_failed_to_completed_notification’, array( $this, ‘trigger’ ) );
add_action( ‘woocommerce_order_status_failed_to_on-hold_notification’, array( $this, ‘trigger’ ) );
by this:
$array_actions_to_send_email = array(
‘woocommerce_order_status_pending_to_processing_notification’,
‘woocommerce_order_status_on-hold_to_processing_notification’,
‘woocommerce_order_status_pending_to_completed_notification’,
‘woocommerce_order_status_pending_to_on-hold_notification’,
‘woocommerce_order_status_failed_to_processing_notification’,
‘woocommerce_order_status_failed_to_completed_notification’,
‘woocommerce_order_status_failed_to_on-hold_notification’,
);
foreach( apply_filters(‘wc_product_vendors_emails_actions’,$array_actions_to_send_email) as $action) {
add_action( $action, array( $this, ‘trigger’ ) );
}
Open
Last updated: January 17, 2020
0 comments
Log in to comment on this feature request.