• Resolved nextsmarter

    (@nextsmarter)


    Now when an order status change from on-hold to processing, default is only 1 email sent to customer.

    In this case, can we add new email template to send to notify vendor too?

    Thank you,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Nazmul Hassan

    (@nazmulhassann20)

    Hello @nextsmarter,

    Thanks for your ticket.

    I am really sorry to inform you that right now the vendor is not getting any email when the admin is changing the order status as it is only for the customer user role. Now, if it is required to send an email to the vendor too then you may need to modify the WooCommerce email template and add vendor email address as a recipient too.

    Cheers!

    Thread Starter nextsmarter

    (@nextsmarter)

    Thanks Nazmul for your quick & great support.

    >> Now, if it is required to send an email to the vendor too then you may need to modify the WooCommerce email template

    As you said, maybe the quickest ways is hook WooCommerce email template.
    Which is quick method to get vendor email for a specified order id inside a hook?

    Thanks Nazmul again.

    Thread Starter nextsmarter

    (@nextsmarter)

    Now we use below code to get email. Share here if anyone need for reference:

            $product_id = $item->get_product_id();
            $seller_id    = get_post_field( 'post_author', $product_id );
            $recipient = dokan()->vendor->get( $seller_id )->get_email();

    Hey this is exactly what i was looking for which file should i add this code ? Thanks heaps

    $product_id = $item->get_product_id();
    $seller_id = get_post_field( ‘post_author’, $product_id );
    $recipient = dokan()->vendor->get( $seller_id )->get_email();

    @nextsmarter Hi would you be able to let me know which file I should add that code to? I am keen to do the change and test it

    Hello,
    Please i am interested in this snippet too,
    can you send us a tutorial how we can do this ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can we send email to vendor when order status change to Processing?’ is closed to new replies.