Hi,
and thank you for writing in!
The goal you want to achieve it’s not so easy as it seems.
At first, you should create a new WooCommerce email; to do it you should:
- create a class for your email that extends the WooCommerce
WC_Email
class
- use the WooCommerce
woocommerce_email_classes
actions to include your email class
- create the email template file correctly, by using the
woocommerce_email_header
and woocommerce_email_footer
actions into it
After creating your WooCommerce email, you should send it when the order status changes, by using one of the order status transition actions you can find in WC_Order::status_transition
method: for example, if your status is shipped
, you could use the woocommerce_order_status_shipped
action. Before sending the email, you could simply check if the order is assigned to a specific vendor or not.
However, in this case, there are plugins that could easily allow you to achieve your goal.