woocommerce_sq_is_available_in_product_page
Hook Filter
Allow modifying the seQura availability at product page
This hook has been deprecated. Use sequra_can_display_widgets instead.
Description
Use this to modify the current availability for displaying promotional components on the product page.
| Parameter | Type | Description |
|---|---|---|
$is_available | bool | Define if promotional components are available for the product |
$product_id | int | Product ID |
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced |
| 3.0.0 | Deprecated |
Usage Example
add_filter('woocommerce_sq_is_available_in_product_page', function($is_available, $product_id){
if($product_id === 999){
return true; // Force to show widgets for the product with ID 999.
}
return $is_available;
}, 10, 2);Updated 15 days ago