benecaster_support_mode_disabled
Fires when Support Mode is turned off — either manually by an admin or automatically by the 7-day auto-disable cron.
When It Fires
Fires from:
Benecaster\Admin\SupportMode::disable()— when an admin toggles Support Mode off in Settings → ToolsBenecaster\Admin\SupportMode::auto_disable()— when the one-shot WP-Cron event fires 7 days after Support Mode was enabled
In both cases, the benecaster_support_mode_enabled and benecaster_support_mode_auto_disable_at wp_options have already been cleared before this hook fires.
Parameters
| Name | Type | Description |
|---|---|---|
$reason |
string | 'manual' when an admin toggled Support Mode off; 'auto' when the 7-day cron fired |
Notes
This is a Free hook. It fires regardless of license status.
Use this hook to tear down any verbose logging your add-on enabled in response to benecaster_support_mode_enabled. The $reason parameter is informational — most add-ons handle both paths identically.
Example Usage
Disable verbose logging and cancel the cleanup cron when Support Mode turns off:
add_action(
'benecaster_support_mode_disabled',
function ( string $reason ): void {
// $reason is 'manual' or 'auto' — tear down regardless.
update_option( 'my_addon_verbose_logging', false, false );
wp_clear_scheduled_hook( 'my_addon_support_mode_cleanup' );
}
);
Related Hooks
benecaster_support_mode_enabled— fires when Support Mode turns onSupportMode— readis_active()without coupling to option names