Skip to main content

benecaster_show_deleted

Action Free Since v1.0.0

Fires before a show is permanently deleted. At the point this hook fires, the show post still exists in the database — `get_post()`, `get_post_meta()`, and `get_the_title()` all return valid data. Use this window to clean up related records in external systems before the local data is removed.

This hook fires on permanent deletion only — moving a show to the Trash fires [benecaster_show_trashed](/hooks/benecaster_show_trashed/) instead. After this hook returns, Benecaster removes all episodes, tokens, and tier configuration belonging to the show, and then WordPress removes the post row itself.

Parameters

Name Type Default Description
$show_id int ID of the show about to be deleted

Examples

Delete show record from external CRM

add_action( 'benecaster_show_deleted', function ( int $show_id ) {
    my_crm_delete_show( $show_id );
} );

Notes

The show post is still readable when this hook fires. After it returns, all associated Benecaster data (episodes, tokens, tier configuration) is queued for deletion in the same request. For reversible deactivation, hook benecaster_show_trashed instead.