<?php
/**
 * Fired during plugin deactivation.
 *
 * This class defines all code necessary to run during the plugin's deactivation.
 *
 * @since      1.0.0
 * @package    Ai_Try_N_Buy
 * @subpackage Ai_Try_N_Buy/includes
 * @author     Edu Brazeal <contact@edubrazeal.com>
 */
class Aitnb_Deactivator {

	/**
	 * The main deactivation method.
	 *
	 * This method is triggered when the plugin is deactivated. It unschedules the
	 * cron event for the AI Style Assistant to prevent it from running while the
	 * plugin is inactive.
	 *
	 * @since    1.0.0
	 */
	public static function deactivate() {
		// Clean up the scheduled cron event.
		require_once plugin_dir_path( __FILE__ ) . 'class-style-assistant-cron.php';
		if ( class_exists( 'Aitnb_Style_Assistant_Cron' ) ) {
			Aitnb_Style_Assistant_Cron::unschedule_event();
		}
	}

}