It’s possible, but at present this plugin is not able to do that.
It’s an idea for the next updates.
To do this you should modify the function “custom_headers_email_function” in the file class-dc-dc-bcc-woe-public.php in my plugin.
Take the products of the order and according to them, choose who send the email.
For example:
function custom_headers_email_function( $headers, $object ) {
global $woocommerce;
$items = WC()->cart->get_cart();
$list_products = array();
foreach($items as $item => $values) {
$_product = $values['data']->post;
array_push($list_products, $_product->ID);
}
if(get_option('dc_wech_new_order')) {
if ($object == 'new_order') {
if(in_array(8, $list_products)) {
$headers .= 'CC: [email protected]' . "\r\n";
$headers .= 'BCC: ' . get_option('dc_wech_email_list_bcc') . "\r\n";
}
}
}
...
}
sends the new order email to [email protected] only if the product with id = 8 is in the order.
If you like the plugin, please give it a rating.
Dario Curasi
Hello dcurasi,
Thanks for the reply. It works great, but the emails and product ids would have to be entered in the code after every product has been added right?
Thanks,
David
Yes, unfortunately it is currently the only solution.