Skip to content
Docs
Get RestroPress

Filter

rpress_get_discount_start

Updated
On this page

Filters the discount start date.

Runs in RPRESS_Discount::get_start() 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 start date.
$discount_idintThe discount ID.

Return value#

string. The start date to use.

Example#

function my_rpress_get_discount_start( $value, $discount_id ) {
	return $value;
}
add_filter( 'rpress_get_discount_start', 'my_rpress_get_discount_start', 10, 2 );

Source#

Applied in:

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