v0.5.0-alpha — licensing scaffold
Pre-releasehooked on facets v0.5.0-alpha — licensing scaffold
Fifth alpha. The plumbing for selling this plugin as a commercial product via Easy Digital Downloads Software Licensing is now in place. Nothing changes for users today — soft enforcement is the default, the plugin works without a key — but the wiring for "buy a license → auto-updates → seat-counted activation" is shipped and tested.
🔑 What's new: licensing scaffold
The plugin now ships a complete EDD-style license client. Open the admin and you'll see a new License entry under System with a key input, status row, expiry, and seat count. Right now there's no store on the other end yet, so the panel sits politely waiting; once hookedonfacets.com flips on EDD + Software Licensing, this becomes a working "paste your key" flow.
No license required for v0.5.x. Enforcement defaults to soft: the plugin works, but the admin shows a dismissible notice pointing at the License panel. Strict gating is one constant flip away when it's time.
🔧 What's in the box
src/Licensing/ (new module):
LicenseManager— single source of truth for license state. Stores key + status + expiry + seat count inwp_options['hof_license']. Daily revalidation cron with aSTALE_AFTERskip so admin page loads don't hammer the store. Exposesis_licensed(),state(),activate(),deactivate(),revalidate().LicenseClient— thin EDD Software Licensing API wrapper. Normalizesactivate_license/deactivate_license/check_license/get_versioncalls into a consistent{status, expires, expires_human, site_count, license_limit, error}shape.Updater— hookspre_set_site_transient_update_plugins+plugins_apiso WP's plugin updater asks the EDD store about new versions. 1-hour transient cache; busts on license state change.
REST endpoints (all admin-only):
| Endpoint | Method | What |
|---|---|---|
/wp-json/hof/v1/license |
GET | Current state w/ fingerprint, status, expiry, seat count |
/wp-json/hof/v1/license/activate |
POST | Submit a key; persists the result |
/wp-json/hof/v1/license/deactivate |
POST | Clear locally + tell store |
Configuration (set in wp-config.php per install):
| Constant | Default | Purpose |
|---|---|---|
HOF_LICENSE_STORE_URL |
https://hookedonfacets.com |
Where to send activation calls |
HOF_LICENSE_ITEM_ID |
unset | EDD Download ID this product matches (must set for real use) |
HOF_LICENSE_ENFORCEMENT |
soft |
soft (notice only) or strict (gate features — future) |
HOF_LICENSE_DEV_MODE |
unset | Pretend every key is valid (CI / local dev) |
Admin:
- New top-level License nav item under System (🔑 icon)
LicenseSettings.jsxpanel — status row with tone colors, key fingerprint, expiry, seat count, store URL, activate/deactivate buttonsLicenseNotice(PHP) — dismissible per-user admin notice on unlicensed/expired installs. Suppressed on the HOF admin SPA itself; dismissal resets on plugin version bump so you see it again after upgrades
🆙 Upgrade from v0.4.0-alpha
Drop-in. No schema changes; nothing user-visible changes by default. After upgrade you'll see the new License nav item in the admin, and the dismissible notice on other admin pages. Both are silent in dev mode.
🆕 Site owners considering the commercial path
This release does not sell anything. The plugin is still free and the source is still public. v0.5 is the engineering work that enables a commercial release — when the store goes live, customers will configure HOF_LICENSE_ITEM_ID, paste their key, and the existing soft-notice machinery becomes the real licensing flow.
Still in the box
Everything from v0.4.0-alpha continues to work: ten public facet displays, three view facets (2D Slider, Ask, Visual DNA), Visual DNA v3 palette matching, admin CRUD with drag-reorder + validation, BYOK Anthropic key for Ask, the EDD-style update channel waiting for a store.
Feedback
Issues, PRs, "this didn't work for me" reports — all welcome.