Action
rpress_post_update_discount
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#
| Parameter | Type | Description |
|---|---|---|
$meta | array | Discount meta that was stored. |
$discount_id | int | The 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), inRPRESS_Discount::update()
See also#
Was this page helpful?
