Skip to content
Docs
Get RestroPress

Action

rpress_pre_update_discount

Updated
On this page

Fires before a discount is updated in the database.

Fires in RPRESS_Discount::update() after the meta has been filtered, before the post title and status are updated.

Available since RestroPress 1.0.6.

Parameters#

ParameterTypeDescription
$metaarrayDiscount meta that will be stored.
$discount_idintThe discount ID.

Example#

function my_pre_update_discount( $meta, $discount_id ) {
	error_log( 'Updating discount ' . $discount_id );
}
add_action( 'rpress_pre_update_discount', 'my_pre_update_discount', 10, 2 );

Source#

Fired from:

  • includes/class-rpress-discount.php (line 1249), in RPRESS_Discount::update()

See also#

Was this page helpful?