sequra_can_display_widgets

Hook Filter

Allow modifying the seQura availability at product page

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
$productWC_ProductProduct instance

Changelog

VersionDescription
3.0.0Introduced

Usage Example

add_filter('sequra_can_display_widgets', function($is_available, $product){
  if($product->get_id() === 999){
    return true; // Force to show widgets for the product with ID 999.
  }
  return $is_available;
}, 10, 2);