Skip to main content

benecaster_token_reactivation_blocked

Action Premium

Fires when a subscription activation event arrives for a subscriber whose access was revoked, and that revocation is not recoverable — meaning the podcaster revoked it deliberately rather than it lapsing through an automated pathway.

This is the guard that stops a bridge event undoing a podcaster’s decision. Without it, a subscriber whose access was revoked by hand could restore it simply by resubscribing in the membership plugin, and the podcaster would never know.

Mutually exclusive with benecaster_token_reactivated — exactly one of the two fires on any given activation dispatch.

What determines “recoverable” is the reason recorded when the access was revoked. Anything that lapsed on its own — a cancelled membership, an expired grace period, a manual grant reaching its end date — comes back normally. A deliberate revoke by the podcaster does not. Access revoked before the reason was recorded counts as recoverable, so older subscribers are never stranded. The full list is filterable via benecaster_token_reactivation_recoverable_reasons.

The intended use is telling the podcaster. Benecaster already listens on this hook and turns it into a Warning-tier admin notice prompting them to either Reset Token or deliberately reinstate access — the subscriber is paying and receiving nothing, so silence is the wrong outcome for everybody.

Parameters

Name Type Default Description
$token_id int — ID of the revoked token record that was not reactivated
$user_id int — WordPress user ID
$show_id int — ID of the show
$tier_slug string — Tier slug the activation event was requesting
$reason string — The `revocation_reason` sentinel that blocked reactivation — in practice `ADMIN_REVOKED`, or a custom sentinel an add-on registered and deliberately left out of the recoverable list.

Examples

Notify the podcaster that a paying subscriber is being refused

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

    wp_mail(
        get_option( 'admin_email' ),
        sprintf( 'Subscription refused for %s', $user->user_email ),
        sprintf(
            "%s resubscribed to %s at tier %s, but their access was revoked (%s) and was not restored.\n\n"
            . "They are being billed and receiving nothing. Reinstate or refund.",
            $user->user_email,
            get_the_title( $show_id ),
            $tier_slug,
            $reason
        )
    );
}, 10, 5 );

Notes

Treat this as a billing problem, not a logging event. The subscriber has an active, paying subscription in the membership plugin and is receiving no feed. Every dispatch of this hook is somebody paying for nothing, and the longer it goes unnoticed the more likely it ends in a chargeback rather than a support ticket.

To actually restore access, use Reset Token — that mints a new token and clears the revoked state. Simply re-running the activation will hit this hook again.

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