<?php

// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound -- APD is the established namespace shared with the Pro add-on and retained for backward compatibility.
namespace APD\Installation;

defined('ABSPATH') || exit;

class Deactivator
{
    public static function deactivate() : void
    {
        if (function_exists('wp_clear_scheduled_hook')) {
            wp_clear_scheduled_hook('apd_demo_cleanup');
            wp_clear_scheduled_hook('apd_newsletter_send_batch');
            wp_clear_scheduled_hook('apd_operational_heartbeat');
        }
        flush_rewrite_rules();
    }
}
