What it does
Every Suite module needs to know: is this license valid? What tier? How many sites? License Manager centralizes that — one persistent connection to the Cloud, one cache, one activation record. Other modules never talk to the Cloud directly; they read from License Manager.
Activation flow
- Admin enters license key on the Wigmorean → License screen
- Plugin POSTs to
/validateon the Cloud with site URL + key - Cloud returns tier, company, expiry, site-used/allowed
- Plugin stores an activation record locally and caches the license state
- Other modules read
Wigmorean_License_Manager::license()to gate features
Site registration
First successful validation on a new site triggers a POST to /activate-site. The Cloud registers the site URL against the license and returns a seat ID. That seat ID stays in wp_options until explicit deactivation.
Deactivating a site
To release a seat (e.g., you're decommissioning a site):
- From the admin — Wigmorean → License → Deactivate site
- WP-CLI —
wp wigmorean license deactivate
Both hit /deactivate-site and clear the local activation record.
Grace period
License Manager caches the validation result for 24 hours. If the Cloud is unreachable on a scheduled refresh, it keeps serving cached data for 14 days. Past 14 days, it enters Grace Period with visible admin warnings. After 28 days with no successful refresh, Suite features deactivate until the Cloud is reachable again.
Internal REST
License Manager exposes its state on an internal REST namespace for other modules:
GET /wp-json/wigmorean-license/v1/status
→ { "valid":true, "tier":"suite", "expires_at":"...", "seat_id":"..." }
Endpoints require manage_options capability.
Programmatic access
// Check current state
$license = Wigmorean_License_Manager::license();
if ( $license->is_valid() && $license->tier === 'suite' ) { ... }
// Force refresh from Cloud
Wigmorean_License_Manager::refresh();