Skip to main content

benecaster_migration_subscriber_imported

Action Premium migration-wizard

Fires once for each imported row, when the row is complete: the WordPress account exists, the feed token is minted and the patron row is written. It does not fire for a skipped row. Use it for per-person actions such as CRM enrichment, custom welcome sequences or external system updates.

It fires once per row, so a 5,000-person export fires it 5,000 times in one request. Queue slow work such as an HTTP call, rather than doing it inline, or the import can time out partway through.

$subscriber_data is a flat array. From the export, under the wizard’s field names: email, source_tier, display_name and join_date (the raw cell, unparsed). All but email may be null, because a field can be left unmapped. From the wizard: patron_id, batch_id (the same ID benecaster_migration_import_started passes), mapped_tier_slug, token_type (subscriber or follower), is_free (bool), source_joined_at (Y-m-d, or null) and grace_period_ends_at (UTC Y-m-d H:i:s, or null).

grace_period_ends_at is null for a free member, who owes no payment and is never revoked. It is also null on every row of an import with no grace period, so it does not tell you who was free — is_free does.

The feed token is never in the array, so logging it cannot leak a private feed URL.

join_date is what the file said and source_joined_at is what was stored. A null source_joined_at beside a non-empty join_date means the date could not be read; the person was still imported.

Branch on is_free, not on token_type. follower is always free, but subscriber can be either a paying migrant in their grace period or a free member on a free Benecaster tier. is_free is the podcaster’s own answer from the tier-mapping step, and it is what decides who gets a grace deadline, a completion link, a payment ask, reminders, expiry, and a place against the plan’s paying limit. A listener that decides any of those from token_type will ask free members to start paying for something they never paid for.

Parameters

Name Type Default Description
$user_id int — WordPress user ID of the imported subscriber
$show_id int — ID of the show
$platform string — Source platform slug
$subscriber_data array — The mapped row plus what the wizard did with it (keys above)

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