

<strong>Dashboard</strong> — stats cards, filterable license table with domain progress bars.
JB License Manager for WooCommerce turns your WordPress + WooCommerce site into a complete software licensing server. Sell plugins, themes, SaaS tools, or any digital product and automatically deliver encrypted license keys, control which domains can use each license, and revoke access instantly — all from your own WordPress dashboard.
MYAPP-XXXXXX-XXXXXX-XXXXXX)Full public and admin REST API at /wp-json/jblm/v1/:
Public endpoints (license key authentication):
POST /activate — register a domain against a license keyPOST /validate — verify a license key + domain (12-hour cached on client)POST /deactivate — release a domain slotPOST /status — lightweight heartbeat check (does not update last_validated)Admin endpoints (API key or logged-in admin):
GET /licenses — list all licenses with pagination, search, status filterPOST /licenses — create a license programmaticallyGET /licenses/{id} — get single license with activationsPUT /licenses/{id} — update status, max_domains, expiryDELETE /licenses/{id} — revoke a licenseGET /licenses/{id}/activations — list all domain activationsGET /stats — dashboard stats (total, active, expired, expiring, revoked){license_key}, {expires_at}, {max_domains}, {order_id}, {customer_email}, {site_name}, {site_url}customer_email required; other columns optionalJBLM_SECRET_KEY in wp-config.php to use a custom valuewp_nonce and current_user_can() checkssanitize_text_field(), sanitize_email(), intval()esc_html(), esc_attr(), esc_url()$wpdb->prepare() with parameterized placeholdersInclude the bundled jblm-client.php in your plugin or theme:
See Sample Plugin
<?php
/**
* Plugin Name: Your Plugin Name
* Version: 1.0.0
*/
// ============================================================
// STEP 1 — Load the license client
// Copy jblm-client.php into your plugin folder, then include it.
// ============================================================
require_once plugin_dir_path( __FILE__ ) . 'jblm-client.php';
// ============================================================
// STEP 2 — Set up your license
// Replace the two values below:
// - 'https://yoursite.com' the site where you installed JB License Manager
// - 'your-plugin-slug' any unique name for your plugin (no spaces)
// ============================================================
$license = new JBLM_Client(
'https://yoursite.com', // CHANGE THIS
'your-plugin-slug' // CHANGE THIS e.g. 'my-seo-plugin'
);
// ============================================================
// STEP 3 — Register AJAX (required for Activate/Deactivate buttons)
// Just copy this line as-is. Don't change anything.
// ============================================================
add_action( 'plugins_loaded', function() use ( $license ) {
$license->register_ajax_hooks();
});
// ============================================================
// STEP 4 — Block your premium features if license is not active
// Put this check at the top of any function that has premium code.
// If the license is invalid, the function will stop here.
// ============================================================
function my_premium_feature() {
global $license;
if ( ! $license->is_valid() ) {
return; // stops here if no valid license
}
// Your premium code goes below this line
echo 'Premium feature is running!';
}
// ============================================================
// STEP 5 — Show the License Key field on your settings page
// Call this inside the function that renders your settings page.
// It will show an input box + Activate / Deactivate buttons.
// ============================================================
function my_plugin_settings_page() {
global $license;
echo '<h1>My Plugin Settings</h1>';
// This one line draws the full license box — input + buttons
$license->render_settings_field();
// ... rest of your settings fields
}
The SDK handles:
* License activation, validation (12 h cache), deactivation
* WordPress Heartbeat integration for instant deactivation — no click needed
* Built-in settings page with Activate / Check Status / Deactivate buttons
* Friendly Urdu/English error messages for common failure cases
/status) does not write to the database — read-onlylicense_key, domain_hash, user_id, status, and created_at columnsJB License Manager for WooCommerce stores the following data in your WordPress database:
This data is stored solely on your own WordPress server. No data is transmitted to any third-party service by this plugin.
External connections: Client sites that use the bundled SDK connect to your WordPress store URL to activate, validate, and check license status. This is a direct connection between two sites you control.
If you collect or process personal data (such as customer email addresses), ensure your site has an appropriate privacy policy as required by GDPR, CCPA, or your local regulations.
The client-side SDK (for your own plugins/themes to validate licenses against this server) is available as a separate download from the plugin’s GitHub page. It is NOT included in the WordPress.org version of this plugin.
The WordPress.org version of this plugin is the license server — it stores and manages licenses. It does not lock any features behind a license check.