benecaster_admin_revoke_notify
Fires when an admin enables ‘Send notification’ during a single or bulk access revocation. The revocation itself has already completed before this action fires — [benecaster_subscriber_access_revoked](/hooks/benecaster_subscriber_access_revoked/) and [benecaster_token_revoked](/hooks/benecaster_token_revoked/) both fire unconditionally on any revocation and run before this action.
Hook here to dispatch a custom access revocation email or trigger a notification in a third-party channel. The built-in email system hooks this action at priority 10 to send the standard access revocation email. You can hook at a higher priority to supplement it, or remove the core callback entirely and replace it with your own.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$token_id |
int |
— | ID of the token record |
$user_id |
int |
— | WordPress user ID |
$show_id |
int |
— | ID of the show |
Examples
Log revocation notification for audit
add_action( 'benecaster_admin_revoke_notify', function (
int $token_id,
int $user_id,
int $show_id
): void {
$user = get_userdata( $user_id );
error_log( sprintf(
'Access revocation notification sent for user %d (show %d)',
$user_id, $show_id
) );
}, 10, 3 );
Notes
Free. Registered regardless of license status.