Add a new order order notification to the email application

In WooCommerce, I use woocommerce-product-vendors as a plugin for several vendors. After checking, I receive as an administrator a new notification email with the application (uploaded file).

But the seller receives the same email address, but without an attachment. I need the seller to get the app too.

thank

+4
source share
1 answer

You can try this code with a custom function connected to : woocommerce_email_recipient_new_order

add_filter('woocommerce_email_recipient_new_order', 'adding_vendor_email', 10, 2);
function adding_vendor_email( $recipient, $order ) {

    // Your code or conditions to get the vendor email (if needed)

    $recipient .= ",vendor@yourdomain.com";
    return $recipient;
}

, ...

function.php ( ), .

woocommerce_email_attachments... .

+2

Source: https://habr.com/ru/post/1674654/


All Articles