Claim your freedom to choose the perfect partner for your multi-vendor journey.

FREEDOM25

Celebrate the festive season by giving your marketplace a powerful lift!

FESTIVE20

5.0.0
Something big is coming for marketplace admins… MultiVendorX 5.0 is almost here. Are you ready?
Be the first to explore all the game-changing features!
Power your marketplace dreams with unbeatable Black Friday deals!

MVXBLACK30

Supercharge your marketplace vision with unstoppable Cyber Monday deals!

MVXCYBER30

Holiday cheer, bigger savings
Take 25% off-because your marketplace deserves a gift too.

happyholiday

View Categories

Suborder

Restrict the suborder mails for the customers #

add_filter( 'woocommerce_email_recipient_customer_on_hold_order', 'customer_email_recipient_change', 10, 2 );
add_filter( 'woocommerce_email_recipient_customer_processing_order', 'customer_email_recipient_change', 10, 2 );
add_filter( 'woocommerce_email_recipient_customer_completed_order', 'customer_email_recipient_change', 10, 2 );

function customer_email_recipient_change( $recipient_email, $order ) {
    $parent_order_id = $order->get_parent_id();
    
    if ( $parent_order_id == 0 ) {
        return $recipient_email;
    } else {
        return ''; // Return an empty string to stop the email from being sent
    }
}

Trigger suborder mail only #

add_filter( 'woocommerce_email_recipient_customer_refunded_order', 'disable_email_for_sub_order', 10,3 );
add_filter( 'woocommerce_email_recipient_customer_completed_order', 'disable_email_for_sub_order', 10,3 );
add_filter( 'woocommerce_email_recipient_customer_on_hold_order', 'disable_email_for_sub_order', 10,3 );

add_filter( 'woocommerce_email_recipient_customer_processing_order', 'disable_email_for_sub_order', 10,3 );
function disable_email_for_sub_order( $recipient, $order, $object ){
   if( wp_get_post_parent_id( $order->get_id() ) ){
      return $recipient;
   } else {
      return;
   }
}

Remove suborder from the My Account page #

/**** Remove Suborder from coustomer my-account page *****/
add_filter( 'woocommerce_account_orders_columns' , function( $suborders ) {
    unset( $suborders['mvx_suborder'] );
    return $suborders;
  } , 999 );

Leave a Reply

Shopping Cart
Scroll to Top