Skip to main content

SupportMode

\Benecaster\Admin\SupportMode

Class Free

Public read-only class exposing the current state of Benecaster’s Support Mode feature. Both methods are static — no instantiation required. Use this class to read Support Mode state from add-on code without coupling to internal option names. To toggle Support Mode from code, use POST /benecaster/v1/tools/settings with support_mode_enabled in the body.

Methods

Method Visibility Since Description
is_active(): bool Public Static. Returns true if Support Mode is currently enabled. Equivalent to (bool) get_option('benecaster_support_mode_enabled') but insulated from future storage changes.
get_auto_disable_at(): ?int Public Static. Returns the Unix timestamp when the auto-disable cron is scheduled to fire, or null if Support Mode is off or the timestamp was cleared.