Skip to main content

benecaster_powerpress_episode_imported

Action Premium migration-wizard

Fires after each draft episode is created from a PowerPress post. The draft episode and all mappable meta fields — title, description, audio URL, episode number, season, artwork, publish date, and explicit flag — are already set when this hook fires. Use it to populate additional fields the importer does not map automatically, trigger external actions, or modify the draft before the podcaster reviews it.

This hook does not fire for posts skipped because they were already imported in a previous run. The $pp_post parameter provides the original PowerPress post object so you can read any PowerPress-specific meta directly from it.

Parameters

Name Type Default Description
$episode_id int ID of the created Benecaster draft episode post
$show_id int ID of the show
$pp_post \WP_Post The original PowerPress WP_Post object that was imported

Examples

Copy PowerPress meta to Benecaster custom field

add_action( 'benecaster_powerpress_episode_imported', function ( int $episode_id, int $show_id, \WP_Post $pp_post ): void {
    $keywords = get_post_meta( $pp_post->ID, 'powerpress_keywords', true );
    if ( $keywords ) {
        update_post_meta( $episode_id, '_benecaster_episode_keywords', $keywords );
    }
}, 10, 3 );

Notes

Each PowerPress post is tracked by its source GUID, so imports are safe to re-run. Posts already imported in a previous run increment the skipped count and do not trigger this hook.

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