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. Fires from Benecaster\Admin\SupportMode::disable() when an admin toggles Support Mode off in Settings → Tools, and from Benecaster\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.
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.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$reason |
string |
— | 'manual' when an admin toggled Support Mode off; 'auto' when the 7-day cron fired |
Examples
Disable verbose logging and cancel cleanup cron on disable
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' );
}
);