Skip to main content

benecaster_subscription_synced

Action Premium

Fires when Sync existing members gives a feed link to somebody who already belonged to the show’s membership plugin before it was connected, instead of benecaster_subscription_activated. These people joined in the plugin, often long ago; Benecaster simply never heard about it. Listen here to tell “was already a member” from “joined today”, and never run a new-member flow (a welcome sequence, a “new supporter” shout-out) for them.

It fires for a member given a new feed link, given their earlier link back, or moved from follower to the paid feed on the same link. It does not fire for a member who already had a working link, one whose link you revoked by hand, or one whose WordPress account is gone.

What else happens. benecaster_token_generated still fires for a member given a new link, because a feed URL now exists; it never meant that a membership began. The subscriber’s history gets a synced entry dated with their real start, the Dashboard’s new-this-period count leaves them out, and Member Thanks counts their tenure from that start. The Welcome email goes out only if the podcaster ticked Email each member their feed link for that sync.

Parameters

Name Type Default Description
$user_id int — WordPress user ID of the member
$show_id int — ID of the show
$tier_slug string — The member's highest mapped tier on the show
$started_at string|null — When their membership began in the plugin, as UTC Y-m-d H:i:s: the earliest start across their records on the show's mapped levels, so a plan change doesn't reset it. Null when the plugin holds no usable date.

Examples

Add synced members to a CRM without the welcome sequence

add_action( 'benecaster_subscription_synced', function (
    int $user_id,
    int $show_id,
    string $tier_slug,
    ?string $started_at
) {
    my_crm_upsert_member( $user_id, $show_id, $tier_slug, [
        'start_welcome_sequence' => false,
        'member_since'           => $started_at, // UTC; null when unknown
    ] );
}, 10, 4 );

Notes

$started_at is never the sync's own date passed off as a real one. When it is null, don't invent an anniversary. An integration that treats benecaster_token_generated as "new member" will misread every synced member; move that logic to this action and benecaster_subscription_activated. See the recipe Treat synced members as existing members.

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