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