<?php
/**
 * Plugin deactivation handler.
 *
 * Clears all scheduled cron events.
 *
 * @package Waitlytics
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class WTLY_Deactivator
 *
 * Handles deactivation tasks for Waitlytics.
 */
class WTLY_Deactivator {

	/**
	 * Run deactivation tasks.
	 *
	 * Clear all scheduled cron events. DB tables and data are
	 * preserved — they are only removed on uninstall (plugin deletion).
	 */
	public static function deactivate() {
		wp_clear_scheduled_hook( 'wtly_check_stock_changes' );
		wp_clear_scheduled_hook( 'wtly_cleanup_expired_subscriptions' );
		wp_clear_scheduled_hook( 'wtly_run_ai_forecast' );
		wp_clear_scheduled_hook( 'wtly_weekly_report_email' );
		wp_clear_scheduled_hook( 'wtly_send_notification_batch' );
	}
}
