Skip to content
Docs
Get RestroPress

Action

rpress_post_update_discount

Updated
On this page

Fires after a discount is updated in the database.

Fires at the end of RPRESS_Discount::update(), after the post and meta writes.

Available since RestroPress 1.0.6.

Parameters#

ParameterTypeDescription
$metaarrayDiscount meta that was stored.
$discount_idintThe discount ID.

Example#

function my_post_update_discount( $meta, $discount_id ) {
	delete_transient( 'my_discount_cache_' . $discount_id );
}
add_action( 'rpress_post_update_discount', 'my_post_update_discount', 10, 2 );

Source#

Fired from:

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

See also#

Was this page helpful?