• Hello!
    I really like your WCFM Ultimate + WCFM Multivendor Marketplace: Great work!

    Only at one point, I can’t find a solution myself: When a customer places an order, the vendor receives a “vendor_new_order” email incl. information about the customer and the product sold. For my workflow, I don’t want my vendors to receive this mail until the status is changed from “on hold” to “processing”.

    There are two ways that status can change: (1) automatically when the order is paid for via paypal etc. and (2) when the admin manually changes the status of that order.

    I would love to have the “vendor_new_order” email sent to the vendor when the status of the order changes to “processing” by adding a snippet to the functions.php.

    Can you provide such a snippet, please?

    Thank you, best regards, Markus

    Additional information: Using another plugin (WC Marketplace), I was facing a similar issue that was solved using this snippet. Maybe that helps – unfortunately I can’t make it work…

    function restrict_vendor_new_order_mail($recipient, $order)
    { $order_status = $order == NULL ? “cancelled”: $order->get_status();
    //In new order,vendor will receive only ‘processing’ mail no other mail will send to vendor.
    if ($order_status == ‘failed’ || $order_status == ‘on-hold’ || $order_status == ‘cancelled’ || $order_status == ‘pending’ && !$order_status == ‘processing’)
    { return; } else { return $recipient; } }

    add_filter(‘woocommerce_email_recipient_vendor_new_order’, ‘restrict_vendor_new_order_mail’, 1, 2);

    add_action( ‘woocommerce_order_status_processing’, ‘wcmp_suborder_status_change_to_processing’ ); function wcmp_suborder_status_change_to_processing( $order_id ) { $suborder_details = wp_get_post_parent_id($order_id); if($suborder_details){ $email_admin = WC()->mailer()->emails[‘WC_Email_Vendor_New_Order’]; $email_admin->trigger($order_id); }

  • The topic ‘Send vendor_new_order mail when status is changed to processing’ is closed to new replies.