benecaster_buyup_definition_deleted
Fires after a buy-up definition is deleted. The deleted record is passed so a callback can identify what was removed without having queried it beforehand.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$buyup_id |
int |
— | ID of the deleted buy-up definition. |
$buyup |
array |
— | The buy-up record as it existed immediately before deletion. |
Examples
Remove the buy-up from an external catalog
add_action( 'benecaster_buyup_definition_deleted', function ( int $buyup_id, array $buyup ): void {
my_catalogue_remove( $buyup_id );
}, 10, 2 );
Notes
Deleting a definition removes the offer from the site. It does not revoke anything a subscriber has already purchased.