Releases and licensing
For maintainers. Licenses and updates run entirely on the SureCart Licensing SDK, so shipping a release means updating three version numbers, building the zip and uploading it to SureCart.
How licensing is wired#
- The SDK (version 1.2.3, MIT license) is bundled unchanged in
licensing/. NahnuFonts\Licensestarts the SDK client oninitwith the store’s public token. Creating the client also registers the SDK’s updater.- The License tab posts the SDK’s own form fields (
_action,_nonce,license_key,submit) to the SDK’sSettings::license_form_submit(). Activation, deactivation, storage and update checks are all the SDK’s. - The SDK stores the key and activation in the
nahnufonts_license_optionsoption and caches update info in a transient. - Nahnu Fonts adds no hooks or REST routes for licensing, and nothing is gated: fonts keep working without a license.
Constant in NahnuFonts\License | Value |
|---|---|
PUBLIC_TOKEN | The store’s SureCart public token |
STORE_URL | https://www.nahnufonts.com |
ACCOUNT_URL | https://www.nahnufonts.com/customer-dashboard/ |
The public token is meant to be public; it only identifies the store. Never put a secret API key in the plugin.
release.json#
release.json in the plugin root describes each release to SureCart. It has no icons or banners.
| Field | Value |
|---|---|
name | Nahnu Fonts |
slug | nahnu-fonts, the plugin folder name. Updates are matched to it |
version | The release version, for example 1.0.0 |
requires | Minimum WordPress version, 7.1 |
tested | Highest WordPress version tested, 7.1 |
requires_php | Minimum PHP version, 8.3 |
sections | Description, installation, FAQ and changelog, shown in the update details |
Release checklist#
- Update the version in the plugin header (
nahnu-fonts.php),readme.txt(Stable tag) andrelease.json. All three must match. - Add a changelog entry to
readme.txtandrelease.json. - Update
Tested up toandtestedif you tested a newer WordPress. - Run the tests.
- Build the zip with the folder
nahnu-fonts/at its root, named with the version:nahnu-fonts-1.0.1.zip. - In SureCart, open the product, upload the zip as a new release and set it as the current release.
- On a licensed test site, go to Dashboard → Updates, click Check again, and update.
- Update the numbers in the website’s
nahnu_statsnippet if the release changes any counts.