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!
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.
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 ?