When the user activates debugging a single event cron starts:
wp_schedule_single_event(time() + 24 * HOUR_IN_SECONDS, 'fs_debug_turn_off_logging_hook');
When the user deactivates debuggong this cron is unscheduled:
wp_unschedule_event($timestamp, 'fs_debug_turn_off_logging_hook');
If the event happens, the option is set to off:
add_action('fs_debug_turn_off_logging_hook', array( self::class, '_turn_off_debug_mode' ) );
Also, in the debug page I added a countdown timer, so the user is informed about the fact that debugging will be disabled automatically.
When the user activates debugging a single event cron starts:
wp_schedule_single_event(time() + 24 * HOUR_IN_SECONDS, 'fs_debug_turn_off_logging_hook');
When the user deactivates debuggong this cron is unscheduled:
wp_unschedule_event($timestamp, 'fs_debug_turn_off_logging_hook');
If the event happens, the option is set to off:
add_action('fs_debug_turn_off_logging_hook', array( self::class, '_turn_off_debug_mode' ) );
Also, in the debug page I added a countdown timer, so the user is informed about the fact that debugging will be disabled automatically.![image](https://github.com/Freemius/wordpress-sdk/assets/4690419/ab43a5c9-c653-4d11-b0ba-bd6d725d24f2)