<?php
namespace Pay4All\Pro\License;

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

/**
 * Wires the License subsystem. Cheap on every request — no HTTP calls, no DB
 * writes unless the merchant hits the Licences page or the cron event fires.
 */
final class Bootstrap {

	public static function run() : void {
		if ( is_admin() ) {
			AdminPage::register();
			AdminPage::bootstrap();
		}
		// Updater : private update channel served by pay4all.net. Public
		// endpoint — updates stay reachable even for expired subscriptions.
		Updater::bootstrap();
		// Cron : 48 h licence recheck. `ensure_scheduled()` runs on `init`
		// so a manually cleared cron table self-heals on the next hit.
		Cron::bootstrap();
	}
}
