sequra_can_display_widget_for_method
Hook
Filter
Allow modifying the seQura availability at product page for a certain payment method
Description
Use this to modify the current availability for displaying promotional components on the product page for a certain payment method.
Parameter | Type | Description |
---|---|---|
$is_available | bool | Define if promotional components are available for the product |
$product | WC_Product | Product instance |
$payment_method | array | Contains the payment method data |
Changelog
Version | Description |
---|---|
3.0.0 | Introduced |
Usage Example
add_filter('sequra_can_display_widget_for_method', function($is_available, $product, $method){
if($product->get_id() === 999 && $payment_method['product'] === 'pp3'){
return true; // Force to show pp3 payment method widget for the product with ID 999.
}
return $is_available;
}, 10, 3);
Updated about 1 month ago