Banner Logo

🌟 Happy Durga Puja! 🌟 Wishing you a prosperous time ahead!

Our Support Might Experience Slight Delays from October 8th to 14th.

Get 23% discount

Coupon code:

PUJA23

Add the name of the seller to the cart and on the checkout page

add_action('init', 'mvx_change_sold_by_cart_checkout');
function mvx_change_sold_by_cart_checkout(){
global $mvx;
 remove_action('woocommerce_get_item_data', array($mvx->vendor_caps, 'add_sold_by_text_cart'), 30, 2);
 add_action('woocommerce_get_item_data', 'add_sold_by_text_cart', 30, 2);
}

function add_sold_by_text_cart($array, $cart_item) {
    if ('Enable' === get_mvx_vendor_settings('sold_by_catalog', 'general') && apply_filters('mvx_sold_by_text_in_cart_checkout', true, $cart_item['product_id'])) {
        $vendor = get_mvx_product_vendors($cart_item['product_id']);
        if ($vendor) {
            echo  '<br>' . $vendor->page_title;
            do_action('after_sold_by_text_cart_page', $vendor);
        }
    }
    return $array;
}

Leave a Reply