| @@ -159,25 +159,8 @@ | ||
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | private static function flush_rewrite_rules() { |
| 163 | - // Unscheduled all WP Data Access events | |
| 164 | - self::unschedule_event( 'wpda_data_backup' ); | |
| 165 | - self::unschedule_event( \WPDataAccess\Query_Builder\WPDA_Query_Builder_Scheduler::SCHEDULER_HOOK_NAME ); | |
| 166 | - self::unschedule_event( \WPDataAccess\Utilities\WPDA_Export_Scheduler::SCHEDULER_HOOK_NAME ); | |
| 167 | - } | |
| 168 | - | |
| 169 | - private static function unschedule_event( $hook ) { | |
| 170 | - $crons = _get_cron_array(); | |
| 171 | - foreach ( $crons as $timestamp => $cron ) { | |
| 172 | - if ( isset( $cron[$hook] ) ) { | |
| 173 | - foreach ( $cron[$hook] as $event ) { | |
| 174 | - if ( isset( $event['args'] ) ) { | |
| 175 | - wp_unschedule_event( $timestamp, $hook, $event['args'] ); | |
| 176 | - } | |
| 177 | - } | |
| 178 | - } | |
| 179 | - } | |
| 180 | 163 | } |
| 181 | 164 | |
| 182 | 165 | private static function set_legacy_tools() { |
| 183 | 166 | // Get current legacy tool settings |