<?php
namespace Vidplex;

// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class Deactivate
 *
 * Handles plugin deactivation procedures.
 *
 * Responsible for cleaning up scheduled tasks, flushing caches,
 * and performing any necessary cleanup when the plugin is deactivated.
 */
class Deactivate {
	/**
	 * Handles plugin activation.
	 *
	 * This method is triggered when the plugin is activated.
	 * It can be used to set up database tables, register custom post types,
	 * flush rewrite rules, or initialize default settings.
	 *
	 * @return void
	 */
	public static function deactivate() {
		$timestamp = wp_next_scheduled( 'vidplex_yt_sync' );
		wp_unschedule_event( $timestamp, 'vidplex_yt_sync' );
	}
}
