Skip to content
Docs
Get RestroPress

Filter

rpress_discount_product_condition

Updated
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#

ParameterTypeDescription
$valuestringThe discount product condition.
$discount_idintThe 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), in RPRESS_Discount::get_product_condition()
Was this page helpful?