Hi,
Please add this code in the function.php of the current active theme and add your custom code as per your requirement.
add_action('init', 'wcmp_change_sold_by_shop_single');
function wcmp_change_sold_by_shop_single(){
global $WCMp;
remove_action('woocommerce_after_shop_loop_item', array($WCMp->vendor_caps, 'wcmp_after_add_to_cart_form'), 6);
remove_action('woocommerce_product_meta_start', array($WCMp->vendor_caps, 'wcmp_after_add_to_cart_form'), 25);
add_action('woocommerce_after_shop_loop_item', 'wcmp_after_add_to_cart_form', 6);
add_action('woocommerce_product_meta_start', 'wcmp_after_add_to_cart_form', 25);
}
function wcmp_after_add_to_cart_form(){
global $post;
if ('Enable' === get_wcmp_vendor_settings('sold_by_catalog', 'general') && apply_filters('wcmp_sold_by_text_after_products_shop_page', true, $post->ID)) {
$vendor = get_wcmp_product_vendors($post->ID);
if ($vendor) {
// your custom code here
do_action('after_sold_by_text_shop_page', $vendor);
}
}
}
Copy
Regards,