If you want to hide the Add to Compare button for specific products you can use the following filter hook:

add_filter( 'woocommerce_better_compare_show_add_to_compare_button' ,'hide_compare_btn', 10, 2);
function hide_compare_btn( $show, $product ){
    
    if($product->get_id() == 123) {
		$show = false;
	}	
	
    return $show;
}

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *