Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards

One Vendor Checkout Only

In order to allow users to add from one vendor only please add this code in the function.php of the theme :

function woocommerce_add_to_cart_validation($passed, $product_id, $quantity){
foreach (WC()->cart->get_cart() as $cart_key => $cart_item ){
$cart_vendor = get_mvx_product_vendors($cart_item[‘product_id’]);
$product_vendor = get_mvx_product_vendors($product_id);
if($cart_vendor && $product_vendor){
if($cart_vendor->id != $product_vendor->id){
$passed = false;
wc_add_notice( __( ‘Another vendor product is already in your cart.’, ‘woocommerce’ ), ‘error’ );
return $passed;
return $passed;

Leave a Reply