Skip to main content

License Activation

Pro

All features described in this document require Burst Statistics Pro.

Burst Statistics Pro uses a license key to enable automatic updates, access tier-specific features, and verify your subscription. License management is handled via the Settings → License screen in your WordPress admin.


Overview

The licensing system communicates with the Burst licensing server at https://license.burst-statistics.com. If that server is unreachable, requests automatically fall back to https://burst-licensing.com. License keys are stored encrypted in the database using AES-256-CBC.


Activating a License

  1. Log in to your WordPress admin.
  2. Navigate to Burst Statistics → Settings → License.
  3. Paste your license key into the Enter your license key field.
  4. Click Save. The plugin immediately contacts the licensing server to activate the key for the current site.

On save, the following happens internally:

  • The license key is encrypted and stored in burst_options_settings['license'].
  • get_license_status( 'activate_license', true ) is called, clearing any cached status and contacting the server.
  • Task validation is rescheduled to reflect the new license state.

Auto-install activation

If a license key is pre-seeded via the burst_auto_installed_license site option (e.g., by a hosting integration), it is automatically activated on the next admin page load without any user action. The site option is deleted once activation completes.

The Auto_Installer's REST endpoint accepts license and item_id as optional request body parameters. Both parameters are read using isset() so that absent keys do not trigger a PHP notice.

Changed in v3.3.0: license and item_id parameter presence is now checked with isset() instead of a truthy check, fixing a PHP notice when either key is absent from the request payload.


Deactivating a License

To deactivate the license for the current site, clear the license key field and save. Alternatively, the REST API action deactivate_license can be used programmatically (see REST API).


License Status Codes

The get_license_status() method returns one of the following string values:

StatusMeaning
emptyNo license key has been entered yet.
validLicense is active and valid for this site.
inactiveLicense exists but has not been activated for any site.
site_inactiveLicense exists but is not activated for this specific site URL.
deactivatedLicense was previously activated but has been deactivated.
expiredLicense key has passed its expiration date.
no_activations_leftAll activation slots on this license are in use.
revokedLicense has been revoked; contact support.
missingLicense key not found in the licensing system; contact support.
invalidLicense key is not valid.
disabledLicense has been disabled.
item_name_mismatchLicense key is valid but belongs to a different product.
invalid_item_idLicense key does not match the expected product ID.
errorThe licensing server could not be reached or returned an unexpected response.

Admin notices

The plugin adds non-dismissible admin notices for two conditions:

  • License not entered — shown when the status is empty.
  • License invalid — shown when the license is not valid (and a key has been entered).

Both notices link directly to Settings → License.


License Tiers

Each license belongs to one of three tiers, stored in burst_license_info['tier']:

Tiersales featuresstory featuresshare-link-advanced
creatorNoNoYes
businessYesNoYes
agencyYesYesYes

During an active trial period, all features are enabled regardless of tier.

Checking tier access in PHP

$licensing = new \Burst\Pro\Admin\Licensing\Licensing();

// Returns true if the active license grants access to the given feature type.
$has_sales = $licensing->valid_for( 'sales' );
$has_story = $licensing->valid_for( 'story' );
$has_advanced = $licensing->valid_for( 'share-link-advanced' );

License Expiration and Renewal

License expiration data is stored in burst_license_info:

PropertyTypeDescription
expires_datestringFormatted expiration date, or "lifetime" for perpetual licenses.
expires_unixintUnix timestamp of expiration; 0 for lifetime licenses.

When the expiration date is within one month, a WP-Cron event (burst_clear_license_cache_on_expiration) is scheduled to fire at the exact expiration timestamp. This clears the license cache and forces a fresh check. Expired licenses are detected immediately on the next admin load.


Activation Limits and Upgrades

PropertyTypeDescription
activation_limitintMaximum number of sites this license can be activated on.
activations_leftintRemaining activation slots; -1 means unlimited.

Upgrade paths

The License_Info::upgrades() method returns available upgrade options based on the current tier and activation limit:

Current licenseAvailable upgrades
Creator (1 site)Creator 5, Business 1, Business 5, Agency
Creator (5 sites)Business 1, Business 5, Agency
Business (1 site)Business 5, Agency
Business (5 sites)Agency
Agency

Each upgrade entry contains:

[
'sites' => 5, // int or 'unlimited'
'tier' => 'Business', // string
'url' => 'https://...' // direct upgrade checkout URL
]

Subscription Information

When subscription data is returned by the licensing server, the following additional fields are populated:

PropertyTypeDescription
has_subscription_infoboolWhether subscription data is available.
subscription_statusstring|nulle.g. active, cancelled, trialling.
subscription_expiration_unixint|nullUnix timestamp of subscription expiration. Note: this may be in the past for cancelled subscriptions even if the license is still valid.
trial_end_timeintUnix timestamp when the trial period ends; 0 if no trial.

Multisite Licensing

Pro

Multisite licensing requires a license tier with sufficient activation slots or an Agency (unlimited) license.

On multisite installations, define the following constant to register the network URL (rather than the subsite URL) with the licensing server:

// In wp-config.php or a must-use plugin:
define( 'burst_pro_multisite', true );

When this constant is present, network_site_url() is used as the registered URL instead of home_url(). License status and info are stored in site options (get_site_option / update_site_option) so they are shared across the network.


Beta Releases

A Beta releases checkbox is available under Settings → Advanced when the license is valid. Enabling it opts the site into pre-release builds via the plugin updater.

caution

Beta releases are not recommended for production sites. They contain major new features that may not be fully stable.

The field is disabled and non-functional when the license is inactive or invalid.


REST API

License actions are handled through the existing Burst REST API using the burst_do_action (POST) and burst_get_action (GET) filter hooks. All endpoints require the user to have Burst view capability.

POST actions

activate_license

Activates the license for the current site.

Request body:

ParameterTypeDescription
licensestringThe plain-text license key to activate.

Response: Same structure as license_notices (see below).

deactivate_license

Deactivates the license for the current site. No additional body parameters required.

Response: Same structure as license_notices.

GET actions

license_notices

Returns the current license status and all associated UI notices.

Response:

FieldTypeDescription
licenseStatusstringCurrent status code (see License Status Codes).
noticesarrayArray of notice objects for display in the admin UI.
hasSubscriptionInfoboolWhether subscription data is available.
subscriptionStatusstringSubscription status string.
subscriptionExpirationintUnix timestamp of subscription expiration.
licenseExpirationintUnix timestamp of license expiration.
licenseExpiresDatestringFormatted expiration date or "lifetime".
licenseIsLifetimebooltrue for perpetual licenses.
tierstringLicense tier (creator, business, agency).
upgradesarrayAvailable upgrade paths.
trialEndTimeintUnix timestamp when the trial ends; 0 if no trial.
activationLimitintMaximum allowed activations.
activationsLeftintRemaining activations; -1 for unlimited.
encryptedLicenseKeystringSimplified-encoded license key for frontend display.

Hooks and Filters

burst_license_verification_args

Filters the HTTP request arguments sent to the licensing server. Useful for customising timeouts or headers in restricted environments.

Parameters:

ParameterTypeDescription
$argsarrayHTTP request arguments passed to wp_remote_post().

Example:

add_filter( 'burst_license_verification_args', function( array $args ): array {
// Increase the timeout for slow server environments.
$args['timeout'] = 30;
return $args;
} );

The $args array contains:

KeyTypeDescription
timeoutintRequest timeout in seconds (default: 15).
sslverifyboolWhether to verify SSL certificates.
bodystringURL-encoded request body.
headersarrayHTTP headers including User-Agent and Content-Type.

The encoded body includes these fields:

FieldDescription
edd_actionThe action: check_license, activate_license, or deactivate_license.
licenseThe plain-text license key.
item_idThe product item ID (BURST_ITEM_ID).
urlThe site URL being registered (or network URL on multisite).
plugin_versionThe current plugin version (BURST_VERSION).
marginInternal CSS margin value used for visual verification.

burst_clear_license_cache_on_expiration

Action hook fired by WP-Cron at the license expiration timestamp. Clears the cached license status and triggers a fresh check from the server.

Parameters: None.

Example:

add_action( 'burst_clear_license_cache_on_expiration', function(): void {
// Custom logic to run when the license expires.
do_something_on_license_expiry();
} );

License Data Storage

License information is persisted in the following WordPress options:

OptionScopeDescription
burst_options_settings['license']SiteAES-256-CBC encrypted license key.
burst_license_infoNetwork (site option)Serialised array of all license metadata.
burst_transientsSiteCustom transient store; holds burst_license_status with expiry.
burst_keyNetwork (site option)Encryption key for the license string.
burst_ssl_verifyNetwork (site option)Whether SSL verification is enabled ('true'/'false').
burst_use_fallback_licensing_domainTransientSet when the primary licensing server is unreachable; valid for 3 months.

License status cache duration

ConditionCache duration
Within the first 7 days after Pro activation2 weeks
After the first 7 days1 month

Cache can be invalidated at any time by calling:

( new \Burst\Pro\Admin\Licensing\Licensing() )->get_license_status( 'check_license', true );

SSL and Fallback Behaviour

The licensing system applies the following fallback strategy on each request:

  1. Attempt request to https://license.burst-statistics.com with SSL verification enabled.
  2. If the failure is an SSL validation error (cURL error 60), retry with sslverify = false.
  3. If still failing, switch to https://burst-licensing.com and retry.
  4. If all three attempts fail, return status error.

When the fallback domain is in use, automatic plugin update download URLs are also rewritten to use that domain.

caution

If burst_ssl_verify is set to 'false' in site options, SSL certificate validation is disabled for all outbound license requests. Restore it by updating the option to 'true' or by triggering a fresh license check from the admin.