Filter
rpress_discount_product_condition
On this page
Filters the discount product condition.
Runs in RPRESS_Discount::get_product_condition() and filters the value before it is returned to the caller. The condition describes how the required menu items must be matched in the cart.
Available since RestroPress 1.0.6.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | string | The discount product condition. |
$discount_id | int | The discount ID. |
Return value#
string. The product condition to use.
Example#
function my_rpress_discount_product_condition( $value, $discount_id ) {
return $value;
}
add_filter( 'rpress_discount_product_condition', 'my_rpress_discount_product_condition', 10, 2 );
Source#
Applied in:
includes/class-rpress-discount.php(line 1011), inRPRESS_Discount::get_product_condition()
Was this page helpful?
