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