Skip to main content

benecaster_podcast_workflow_after_task_status_change

Action Premium podcast-workflow

Fires once the status of one task in an episode’s Podcast Workflow production plan has changed. It fires only when the status changed and the write is done.

Parameters

Name Type Default Description
$episode_id int — The episode whose plan holds the task
$task_id string — The task's `id` in the plan
$new_status string — `not_started`, `in_progress`, `blocked` or `complete`
$old_status string — The status before the change, one of the same four
$show_id int — The episode's own show

Example

add_action( 'benecaster_podcast_workflow_after_task_status_change', function ( int $episode_id, string $task_id, string $new_status, string $old_status, int $show_id ): void {
    if ( 'blocked' === $new_status ) {
        my_plugin_alert_producer( $episode_id, $task_id );
    }
}, 10, 5 );

Notes

Late is worked out when shown and is never a status, so no hook fires when a task becomes late. The plan's own save actions fire too. Walkthrough: Read and set the status of a task in an episode's production plan, and run code when one changes.

Affects

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

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