benecaster_ssp_import_after
Fires after all Seriously Simple Podcasting episodes have been processed for a show — whether triggered from the Setup Wizard when SSP is detected on activation, or from Benecaster → Settings → Tools → Import Episodes.
This hook fires regardless of whether any new episodes were created: check `$imported > 0` if you only want to react to runs that produced new drafts. The import is safe to re-run — each episode is tracked by its source GUID, so previously imported episodes increment `$skipped` rather than creating duplicates. When both SSP and PowerPress content are imported in the same job, this hook fires before [benecaster_powerpress_import_after](/hooks/benecaster_powerpress_import_after/).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$show_id |
int |
— | ID of the show |
$imported |
int |
— | Number of episodes successfully imported |
$skipped |
int |
— | Number of SSP posts skipped (already imported, invalid, or excluded) |
Examples
Send Slack notification after SSP import
add_action( 'benecaster_ssp_import_after', function ( int $show_id, int $imported, int $skipped ): void {
if ( $imported === 0 ) {
return; // Nothing new — skip the notification.
}
$message = sprintf(
'SSP import for show %d complete — %d new drafts created, %d skipped.',
$show_id,
$imported,
$skipped
);
wp_remote_post( MY_SLACK_WEBHOOK_URL, [
'body' => wp_json_encode( [ 'text' => $message ] ),
'headers' => [ 'Content-Type' => 'application/json' ],
] );
}, 10, 3 );
Notes
Fires on every run, including runs that create no new drafts. Guard with $imported > 0 to avoid unnecessary work on empty runs.