Skip to main content

benecaster_podcast_workflow_before_status_change

Action Premium podcast-workflow

Fires before an episode’s Podcast Workflow status is written, only when the status changes. Benecaster’s episode note recording the change is written after this hook and before the after hook.

Parameters

Name Type Default Description
$episode_id int — The episode whose workflow status is changing
$new_status string — The new status. On the Workbench, `draft`, `review` or `approved`.
$old_status string — The status before the change
$show_id int — The episode's own show

Example

add_action( 'benecaster_podcast_workflow_before_status_change', function ( int $episode_id, string $new_status, string $old_status, int $show_id ): void {
    my_audit_log( 'workflow-status-changing', $episode_id, $old_status . ' -> ' . $new_status );
}, 10, 4 );

Notes

Review and Approved are Podcast Workflow's own record (post meta _benecaster_workflow_status), never a post_status. Scheduled and Published are read from the post (private counts as published) and are never set through this hook. Walkthrough: Run your own code when an episode's workflow status, recording or outline changes in Podcast Workflow.

Affects

  • Workbench
  • PUT benecaster-podcast-workflow/v1/shows/{show_id}/episodes/{episode_id}/workflow-status

Need this built rather than just documented? See our services →