Skip to content
Docs
Get RestroPress

Filter

rpress_get_discount_excluded_products

Updated
On this page

Filters the discount excluded menu items.

Runs in RPRESS_Discount::get_excluded_products() 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#

ParameterTypeDescription
$valuearrayThe discount excluded menu items.
$discount_idintThe discount ID.

Return value#

array. The excluded menu items to use.

Example#

function my_rpress_get_discount_excluded_products( $value, $discount_id ) {
	return $value;
}
add_filter( 'rpress_get_discount_excluded_products', 'my_rpress_get_discount_excluded_products', 10, 2 );

Source#

Applied in:

  • includes/class-rpress-discount.php (line 832), in RPRESS_Discount::get_excluded_products()
Was this page helpful?