Untitled
webwizards
Plain Text
09/24/2025 3:32 PM
580 B
12
Indexable
Never
add_filter('b2bking_quote_button_product_page', function($val){
$val = true;
global $product;
if ($product){
$product_id = $product->get_id();
$response = b2bking()->get_applicable_rules('quotes_products', $product_id);
$haverules = 'no';
if ($response !== 'norules'){
$rules = $response[0];
if (!empty($rules)){
$haverules = 'yes';
}
}
if ($haverules === 'yes'){
// yes, have quote
$val = false;
}
}
return $val;
}, 10, 1);Editor is loading...
Leave a Comment