• Resolved roneisantos

    (@roneisantos)


    Hi,

    How send email status to seller, notification:

    Admin change status: order to PROCESSING. Not notification seller. ( paid is ok)
    Admin change status: order to CANCELED. Not notification seller. (IMPORTANT)
    Admin change status: order to INVOICE. Not notification seller.
    Admin change status: order to COMPLETE. Not notification seller.

    How, i can enable status to seller, notification ?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter roneisantos

    (@roneisantos)

    Hi,

    I This code notify the customer canceled!

    Now how i can update code to notification seller?

    /**
    * Adds the customer email on the receipient list for cancelled orders notifications.
    * */
    function cancelled_order_add_customer_email($emails)
    {
    class My_WC_Email_Cancelled_Order extends WC_Email_Cancelled_Order
    {
    public function trigger($order_id) {
    $this->recipient .= (empty($this->recipient) ? ” : ‘,’).wc_get_order($order_id)->billing_email;
    return parent::trigger($order_id);
    }
    }
    $emails[‘WC_Email_Cancelled_Order’] = new My_WC_Email_Cancelled_Order();
    return $emails;
    }
    add_filter(‘woocommerce_email_classes’, ‘cancelled_order_add_customer_email’, 10);

    Thanks team!

    Hi,
    Thanks for pointing this out , we are working on our Email transaction points and will definitely keep them in mind for future updates.

    Here is the code you are looking for, I have modified your given code a bit :

    
    /**
     * Adds the customer email on the receipient list for cancelled orders notifications.
     * */
    function cancelled_order_add_customer_email($emails)
    {
    	class My_WC_Email_Cancelled_Order extends WC_Email_Cancelled_Order 
    	{
    		public function trigger($order_id) {
    			$this->recipient .= (empty($this->recipient) ? '' : ',').wc_get_order($order_id)->billing_email;
                            $this->recipient  = apply_filters( 'woocommerce_email_recipient_cancelled_order', $this->recipient, $this->object );
    			return parent::trigger($order_id);	
    		}
    	}
    	$emails['WC_Email_Cancelled_Order'] = new My_WC_Email_Cancelled_Order();
    	return $emails;
    }
    add_filter( 'woocommerce_email_classes', 'cancelled_order_add_customer_email', 10);
    add_filter( 'woocommerce_email_recipient_cancelled_order', 'dokan_wc_email_recipient_add_seller', 10, 2 );

    Let me know if it’s working.
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Order Status Not work send email seller’ is closed to new replies.