<?php
/**
 * Plugin deactivation routines.
 *
 * @package CartNinjaRecovery
 */

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

class CARTNINJA_Deactivator {

	public static function deactivate() {
		if ( function_exists( 'as_unschedule_all_actions' ) ) {
			as_unschedule_all_actions( 'cartninja_mark_cart_abandoned' );
			as_unschedule_all_actions( 'cartninja_send_cart_notification' );
		}

		wp_clear_scheduled_hook( 'cartninja_mark_cart_abandoned' );
		wp_clear_scheduled_hook( 'cartninja_send_cart_notification' );
		wp_clear_scheduled_hook( 'cartninja_cleanup_tracking_data' );
	}
}
