Skip to main content

benecaster_token_first_accessed

Action Free Since v1.0.0

Fires the first time a subscriber’s podcast app polls a valid feed token, confirming the subscriber has successfully added the feed to an app and that it is working. Fires immediately after the first-access timestamp is recorded, but only when that value was previously unset — the hook fires at most once per token’s lifetime.

Distinct from [benecaster_token_generated](/hooks/benecaster_token_generated/), which fires at sign-up when the token is created regardless of whether the subscriber ever opens a podcast app. Use [benecaster_token_first_accessed](/hooks/benecaster_token_first_accessed/) for onboarding automations that should trigger only for confirmed, active listeners. Tokens that have never been accessed are excluded from inactivity reporting — they represent subscribers who have not yet configured their app, which is a different onboarding state from subscribers who configured their app and then went silent. Free — registered regardless of license status.

Parameters

Name Type Default Description
$user_id int WordPress user ID
$show_id int ID of the show
$tier_slug string Tier slug for this subscription

Examples

Confirm app configured, exit nurture

add_action( 'benecaster_token_first_accessed', function (
    int    $user_id,
    int    $show_id,
    string $tier_slug
): void {
    $user = get_userdata( $user_id );
    if ( ! $user ) {
        return;
    }

    // Remove from setup-pending sequence and record the confirmation event.
    my_esp_remove_tag( $user->user_email, 'podcast-setup-pending' );
    my_crm_event( $user->user_email, 'podcast_app_configured', [
        'show_id'   => $show_id,
        'tier_slug' => $tier_slug,
    ] );
}, 10, 3 );

Notes

Free — registered regardless of license status. Because this hook fires at most once per token, callback cost is low-risk even with large subscriber bases.