Skip to main content

benecaster_podcast_workflow_after_finalise_plan

Action Premium podcast-workflow

Fires once an episode’s Podcast Workflow production plan has been finalised (Finalise plan) or sent back to draft (Back to draft). It fires only when the value changed and the write is done.

Parameters

Name Type Default Description
$episode_id int — The episode whose plan is being finalised
$finalised bool — `true` for Finalise plan, `false` for Back to draft
$show_id int — The episode's own show

Example

add_action( 'benecaster_podcast_workflow_after_finalise_plan', function ( int $episode_id, bool $finalised, int $show_id ): void {
    if ( $finalised ) {
        my_plugin_post_to_team_chat( $episode_id );
    }
}, 10, 3 );

Notes

A finalised plan's tasks can still be changed. The plan's own save actions fire too. Walkthrough: Read or change an episode's production plan, change how a new plan starts, and run code when a plan is finalised.

Affects

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

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