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;
}
Hold on! Effortless Integration is here!
Transform your WordPress site into a seamless multivendor platform with MultiVendorX. Get a 15-minute free consultation today!
Leave a Reply
You must be logged in to post a comment.