Skip to main content

benecaster_podcast_workflow_before_finalise_plan

Action Premium podcast-workflow

Fires before an episode’s Podcast Workflow production plan is finalised (Finalise plan) or sent back to draft (Back to draft), only when the value changes.

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_before_finalise_plan', function ( int $episode_id, bool $finalised, int $show_id ): void {
    my_audit_log( 'workflow-plan-finalising', $episode_id, $finalised ? 'final' : 'draft' );
}, 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 →