Action
rpress_post_delete_discount
On this page
Fires after a discount has been permanently deleted.
Runs in rpress_remove_discount() right after wp_delete_post() has force-deleted the discount. The post and its meta no longer exist, so only the ID is available.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$discount_id | int | ID of the discount post that was deleted. |
Example#
function my_after_discount_delete( $discount_id ) {
delete_transient( 'my_discount_cache_' . $discount_id );
}
add_action( 'rpress_post_delete_discount', 'my_after_discount_delete' );
Source#
Fired from:
includes/discount-functions.php(line 198), inrpress_remove_discount()
See also#
Was this page helpful?
