| @@ -1,13 +1,11 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace FlyWP\Api; |
| 4 | 4 | |
| 5 | -use WP_Error; | |
| 6 | - | |
| 7 | 5 | class UpdatesData { |
| 8 | - private const CRON_HOOK = 'flywp_send_updates_data'; | |
| 9 | - private const CRON_INTERVAL = 'twicedaily'; | |
| 6 | + public const CRON_HOOK = 'flywp_send_updates_data'; | |
| 7 | + public const CRON_INTERVAL = 'twicedaily'; | |
| 10 | 8 | |
| 11 | 9 | /** |
| 12 | 10 | * UpdatesData constructor. |
| 13 | 11 | */ |
| @@ -233,17 +231,7 @@ | ||
| 233 | 231 | require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 234 | 232 | } |
| 235 | 233 | if ( ! function_exists( 'get_plugin_updates' ) ) { |
| 236 | 234 | require_once ABSPATH . 'wp-admin/includes/update.php'; |
| 237 | - } | |
| 238 | - } | |
| 239 | - | |
| 240 | - /** | |
| 241 | - * Deactivate the scheduler when the plugin is deactivated. | |
| 242 | - */ | |
| 243 | - public function deactivate(): void { | |
| 244 | - $timestamp = wp_next_scheduled( self::CRON_HOOK ); | |
| 245 | - if ( $timestamp ) { | |
| 246 | - wp_unschedule_event( $timestamp, self::CRON_HOOK ); | |
| 247 | 235 | } |
| 248 | 236 | } |
| 249 | 237 | } |