Skip to main content

benecaster_license_hard_limit_reached

Action Premium Since v1.0.0

Fires after 30 consecutive days of license server unreachability. At this point the plugin enters degraded mode: premium features are restricted, new token generation is blocked, and a non-dismissible banner appears in all Benecaster admin screens. Existing subscriber feeds continue to work — degradation is fail-open, not an immediate revocation. The restriction lifts automatically on the next successful validation.

This hook also fires on each subsequent failure day after the 30-day threshold has been crossed, not only on the crossing day itself.

Parameters

Name Type Default Description
$failure_days int Cumulative consecutive days of validation failure (always ≥ 30 when this hook fires)

Examples

Send critical PagerDuty alert on day 30 only

add_action( 'benecaster_license_hard_limit_reached', function( int $failure_days ): void {
    if ( $failure_days !== 30 ) {
        return; // Only alert on the exact day of the limit crossing
    }
    wp_remote_post( MY_PAGERDUTY_WEBHOOK, [
        'body' => json_encode([
            'summary' => sprintf(
                'CRITICAL: Benecaster premium features restricted on %s — license server unreachable for 30 days.',
                home_url()
            ),
            'severity' => 'critical',
        ]),
        'headers' => [ 'Content-Type' => 'application/json' ],
    ] );
} );

Notes

This hook fires on day 30 and again on each subsequent failure day. Check $failure_days === 30 inside your callback to react only on the threshold-crossing day. Distinct from benecaster_validation_failure, which fires on every unreachable day from day 1. Related: benecaster_license_validated fires when the server becomes reachable again and the failure counter resets, lifting the premium restriction.