Filter
rpress_get_discount_type
On this page
Filters the discount type.
Runs in RPRESS_Discount::get_type() and filters the value before it is returned to the caller. The type is percent or flat.
Available since RestroPress 1.0.6.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | string | The discount type. |
$discount_id | int | The discount ID. |
Return value#
string. The type to use.
Example#
function my_rpress_get_discount_type( $value, $discount_id ) {
return $value;
}
add_filter( 'rpress_get_discount_type', 'my_rpress_get_discount_type', 10, 2 );
Source#
Applied in:
includes/class-rpress-discount.php(line 772), inRPRESS_Discount::get_type()
Was this page helpful?
