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.

ParameterTypeDescription
$is_availableboolDefine if promotional components are available for the product
$product_idintProduct ID

Changelog

VersionDescription
2.0.0Introduced

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);