*/ final class Desactivator { /** * Desactivate the plugin and remove schedule cron. * * @since 2.0.0 * @return void */ public static function desactivate() { if ( ACTIRISE_CRON === 'true' ) { wp_clear_scheduled_hook( 'actirise_cron_update_adstxt' ); wp_clear_scheduled_hook( 'actirise_cron_update_presized_div' ); wp_clear_scheduled_hook( 'actirise_cron_update_debug_token' ); wp_clear_scheduled_hook( 'actirise_cron_update_fast_cmp' ); } if ( Options::get( 'adstxt-file' ) === 'true' ) { $ads_txt_file = ABSPATH . 'ads.txt'; if ( file_exists( $ads_txt_file ) ) { wp_delete_file( $ads_txt_file ); } } } }