benecaster_subscriber_access_revoked
Fires when an admin manually revokes a subscriber’s feed access from the Subscriber detail panel in the dashboard. The subscriber’s token has already been revoked in the database at the point this hook fires — use it for logging, sending notifications, or updating external records.
This hook is distinct from [benecaster_token_revoked](/hooks/benecaster_token_revoked/), which fires on all token revocations including programmatic ones triggered by a bridge detecting a lapsed subscription. Use [benecaster_subscriber_access_revoked](/hooks/benecaster_subscriber_access_revoked/) when you want to react specifically to explicit, human-initiated revocations from the admin UI. The subscriber’s WordPress user account is not deleted — only their Benecaster token is revoked. If the subscriber later resubscribes through the membership plugin, a new token is generated and [benecaster_token_generated](/hooks/benecaster_token_generated/) fires.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$user_id |
int |
— | WordPress user ID |
$show_id |
int |
— | ID of the show |
Examples
Write admin revocation to audit log
add_action( 'benecaster_subscriber_access_revoked', function ( int $user_id, int $show_id ): void {
$user = get_userdata( $user_id );
my_audit_log_write( [
'event' => 'subscriber_access_revoked',
'actor' => 'admin',
'email' => $user ? $user->user_email : "user:{$user_id}",
'show_id' => $show_id,
'at' => gmdate( 'Y-m-d\TH:i:s\Z' ),
] );
}, 10, 2 );
Notes
The subscriber's WordPress user account is not deleted — only the Benecaster token is revoked. For all token revocations including automated bridge-triggered ones, use benecaster_token_revoked instead.