get_storage(), 'garbage_collect' ) ); add_action( self::ACTION, array( Logger::class, 'delete_old_logs' ) ); } /** * Setup the garbage collection cron job. */ public static function activate() { self::setup(); if ( ! wp_next_scheduled( self::ACTION ) ) { wp_schedule_event( time(), 'hourly', self::ACTION ); } } /** * Remove the garbage collection cron job. */ public static function deactivate() { wp_clear_scheduled_hook( self::ACTION ); } }