<?php

/**
 * Fired during plugin deactivation
 *
 * @link       https://scholar-sync.org
 * @since      1.0.0
 *
 * @package    ScholarSync
 * @subpackage ScholarSync/includes
 */

/**
 * Fired during plugin deactivation.
 *
 * This class defines all code necessary to run during the plugin's deactivation.
 *
 * @since      1.0.0
 * @package    ScholarSync
 * @subpackage ScholarSync/includes
 * @author     Scholar Sync Team <support@scholar-sync.org>
 */
class ScholarSync_Deactivator {

	/**
	 * Short Description. (use period)
	 *
	 * Long Description.
	 *
	 * @since    1.0.0
	 */
	public static function deactivate() {
        $timestamp = wp_next_scheduled( 'scholar_sync_background_sync' );
        if ( $timestamp ) {
            wp_unschedule_event( $timestamp, 'scholar_sync_background_sync' );
        }
	}
}
