Disable the discount table for bundle product
Disable the discount table for bundle products.
add_filter( 'advanced_woo_discount_rules_hide_specific_rules_in_bulk_table', function($status, $rule_id, $rule, $product){
if(function_exists('wc_get_product')){
$product = wc_get_product();
$manage_discount = \Wdr\App\Router::$manage_discount;
if (is_object($product) && $product->get_type() == 'yith_bundle') {
$status = true;
}
}
return $status;
}, 10, 4);
//Change the varible product Dynamic
add_filter( 'advanced_woo_discount_rules_disable_load_dynamic_bulk_table', function($status){
if(function_exists('wc_get_product')){
$product = wc_get_product();
if (is_object($product) && $product->get_type() == 'yith_bundle') {
$status = "off";
}
}
return $status;
}, 10);