benecaster_podcast_workflow_after_save_subscriber_notification
Fires once an episode’s Podcast Workflow Subscriber notification box and notes have been saved, on every save, from the Workbench or PUT /benecaster-podcast-workflow/v1/shows/{show_id}/episodes/{episode_id}/subscriber-notification. It fires only once the write is done.
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_after_save_subscriber_notification', function ( int $episode_id, bool $notified, string $notes, int $show_id ): void {
if ( $notified ) {
my_plugin_post_to_chat( sprintf( 'Listeners told about %s', get_the_title( $episode_id ) ) );
}
}, 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 →