It's recommended that you install Harbor as a project dependency via Composer:
composer require stellarwp/harborWe actually recommend that this library gets included in your project using Strauss.
Luckily, adding Strauss to your
composer.jsonis only slightly more complicated than adding a typical dependency, so checkout our strauss docs.
Initializing the Harbor library should be done within the plugins_loaded action, preferably at priority 0.
use LiquidWeb\Harbor\Harbor;
add_action( 'plugins_loaded', function() {
/**
* Configure the container.
*
* The container must be compatible with stellarwp/container-contract.
* See here: https://github.com/stellarwp/container-contract#usage.
*
* If you do not have a container, we recommend https://github.com/lucatume/di52
* and the corresponding wrapper:
* https://github.com/stellarwp/container-contract/blob/main/examples/di52/Container.php
*/
$container = new Container();
Config::set_container( $container );
Harbor::init();
}, 0 );Package is using __( 'Invalid request: nonce field is expired. Please try again.', '%TEXTDOMAIN%' ) function for translation. In order to change domain placeholder '%TEXTDOMAIN%' to your plugin translation domain run
./bin/stellar-harbor domain=<your-plugin-domain>or
./bin/stellar-harborand prompt the plugin domain You can also add lines below to your composer file in order to run command automatically
"scripts": {
"stellar-harbor": [
"vendor/bin/stellar-harbor domain=<your-plugin-domain>"
],
"post-install-cmd": [
"@stellar-harbor"
],
"post-update-cmd": [
"@stellar-harbor"
]
}Harbor discovers your plugin's embedded key automatically by scanning active plugins for a file named LWSW_KEY.php in the plugin root. No filter registration is required. See the Harbor Integration Guide for more details.
This project uses @stellarwp/changelogger to manage its changelog. All notable changes are tracked via changelog entry files in the changelog/ directory.
To add a new changelog entry:
bunx @stellarwp/changelogger addTo compile changelog entries into changelog.txt:
bunx @stellarwp/changelogger write --overwrite-version <version>- Harbor — Primary architecture document for v3 unified licensing.
- Licensing — Key discovery, API responses, validation workflows, caching.
- Catalog — Product families, tiers, features, the Commerce Portal API.
- Features — Feature types, resolution, strategies, Manager API, REST endpoints.
- Unified License Key — Key model, seat mechanics, system boundaries.
- Multi-Instance Architecture — Leader election, cross-instance hooks, thin instances.
- Harbor Integration Guide — How to integrate your plugin with Harbor.
- CLI Commands — WP-CLI commands for feature management.
- Testing — How to set up and run automated tests with Codeception and
slic.