benecaster_buyup_price_deleted
Fires after one of a buy-up’s price rows is deleted, for example when the podcaster removes a billing period from the buy-up editor. The row is already gone when this fires, so a callback that needs its amount or cadence must have kept a copy.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$price_id |
int |
— | ID of the deleted buy-up price row. |
Examples
Log a withdrawn billing period
add_action( 'benecaster_buyup_price_deleted', function ( int $price_id ): void {
error_log( "Buy-up price row {$price_id} was removed." );
} );
Notes
It does not fire when a whole buy-up is deleted. benecaster_buyup_definition_deleted carries the buy-up's price rows instead, and firing both would cancel each pending price change twice. Benecaster listens to cancel any price change still pending on the row, with the cancellation email, so holders who were told about a rise hear that it is not happening. Removing a price row does not change what existing holders pay.
Need this built rather than just documented? See our services →