benecaster_podcast_workflow_before_save_subscriber_notification
Fires before an episode’s Podcast Workflow Subscriber notification box and notes are saved, on every save, from the Workbench or PUT /benecaster-podcast-workflow/v1/shows/{show_id}/episodes/{episode_id}/subscriber-notification.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$episode_id |
int |
— | The episode being saved |
$notified |
bool |
— | `true` when **Subscribers notified** is ticked |
$notes |
string |
— | The notes as stored: plain text, tags stripped, line breaks kept, ends trimmed |
$show_id |
int |
— | The episode's own show |
Example
add_action( 'benecaster_podcast_workflow_before_save_subscriber_notification', function ( int $episode_id, bool $notified, string $notes, int $show_id ): void {
my_audit_log( 'workflow-subscriber-notification-saving', $episode_id, $notified ? 'ticked' : 'not ticked' );
}, 10, 4 );
Notes
The box and notes are the tile's form while the Email Editor is off for the show; with it on, the tile reads the Email Editor's choice and never writes it. Walkthrough: Read or save an episode's Subscriber notification, and run code when it is saved.
Affects
- Workbench
- PUT benecaster-podcast-workflow/v1/shows/{show_id}/episodes/{episode_id}/subscriber-notification
Need this built rather than just documented? See our services →