<?php
/**
 * Plugin deactivation routine.
 *
 * The plugin's first-ever deactivation hook. It clears the scheduled daily
 * retention event so that deactivating the plugin does not leave WP-Cron trying
 * to fire wrenchpress_retention_purge, a hook whose callback would no longer
 * load. It touches no stored customer data; uninstall-time data handling stays
 * in uninstall.php.
 *
 * @package WrenchPress
 */

defined( 'ABSPATH' ) || exit;

/**
 * Class WrenchPress_Deactivator
 */
class WrenchPress_Deactivator {

	/**
	 * Run on plugin deactivation.
	 *
	 * Clears every scheduled occurrence of the retention event. Safe to call when
	 * nothing is scheduled (wp_clear_scheduled_hook is a no-op then), so it is
	 * idempotent across repeated deactivations.
	 *
	 * @return void
	 */
	public static function deactivate() {
		wp_clear_scheduled_hook( 'wrenchpress_retention_purge' );
	}
}
