I have created a custom order status on functions.php called Packed
.
How do I send a custom email when the order status changes from Processing
to Packed
?
I tried using the below code but for some reason its not working.
add_filter( 'woocommerce_email_recipient_packed_order','adding_customer_email_recipient_to_packed', 10, 2 );
function adding_customer_email_recipient_to_packed( $recipient, $order ){
if( is_admin() ) return $recipient;
$billing_email = $order->get_billing_email();
$recipient .= ', ' . $billing_email;
}
My Wordpress Version: 4.9.9
Woocommerce Version: 3.5
Please help me send the email.
Thanks in advance.