Filter
rpress_get_discount_product_reqs
On this page
Filters the discount product requirements.
Runs in RPRESS_Discount::get_product_reqs() and filters the value before it is returned to the caller. The array holds menu item IDs. The filtered value is cast to array before it is returned.
Available since RestroPress 1.0.6.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | array | The discount product requirements. |
$discount_id | int | The discount ID. |
Return value#
array. The product requirements to use.
Example#
function my_rpress_get_discount_product_reqs( $value, $discount_id ) {
return $value;
}
add_filter( 'rpress_get_discount_product_reqs', 'my_rpress_get_discount_product_reqs', 10, 2 );
Source#
Applied in:
includes/class-rpress-discount.php(line 811), inRPRESS_Discount::get_product_reqs()
Was this page helpful?
