0

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.

  • 1
    Please check this https://stackoverflow.com/questions/48820439/add-new-order-status-and-send-email-notification-woocommerce – developerme Feb 18 '19 at 08:15
  • @developerme Thanks a lot. I am now able to send emails. –  Feb 18 '19 at 08:24
  • @developerme Just Upvoted. Do you know how to create custom email notification with woocommerce? –  Feb 18 '19 at 08:33
  • @SushangNirola Yes. just show what have you done. We will help – melvin Feb 18 '19 at 09:38

0 Answers0