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