<?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;

use APD\Support\Capabilities;

defined('ABSPATH') || exit;

class Activator
{
    public static function activate() : void
    {
        Capabilities::syncAdministratorCaps();
        Capabilities::syncShopManagerCaps();
        UpgradeManager::maybeUpgrade();
        set_transient('apd_activation_redirect', '1', MINUTE_IN_SECONDS);

        flush_rewrite_rules();
    }
}
