<?php
/**
 * Plugin Deactivator
 *
 * @package AIContentGenerator
 */

namespace AICG;

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

/**
 * Fired during plugin deactivation
 */
class Deactivator
{

    /**
     * Deactivation routine
     */
    public static function deactivate()
    {
        // Clear scheduled cron events
        wp_clear_scheduled_hook('roidaico_scheduled_publish');
        wp_clear_scheduled_hook('roidaico_keyword_check');
        wp_clear_scheduled_hook('roidaico_queue_check');

        // Flush rewrite rules
        flush_rewrite_rules();
    }
}
