Filter
rpress_get_discount_min_price
On this page
Filters the discount minimum cart amount.
Runs in RPRESS_Discount::get_min_price() and filters the value before it is returned to the caller. The filtered value is cast to float before it is returned.
Available since RestroPress 1.0.6.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | float | The discount minimum cart amount. |
$discount_id | int | The discount ID. |
Return value#
float. The minimum cart amount to use.
Example#
function my_rpress_get_discount_min_price( $value, $discount_id ) {
return (float) $value;
}
add_filter( 'rpress_get_discount_min_price', 'my_rpress_get_discount_min_price', 10, 2 );
Source#
Applied in:
includes/class-rpress-discount.php(line 957), inRPRESS_Discount::get_min_price()
Was this page helpful?
