Skip to content
Docs
Get RestroPress

Filter

rpress_get_discount_expiration

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

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