plugin documentation version 4.3.2
First of all, Thank you so much for purchasing this plugin and for being my loyal customer.
You are awesome!
You are entitled to get free lifetime updates to this product + exceptional support from the author directly.
This documentation is to help you regarding each step of customization. Please go through the documentation carefully to understand how this plugin is made and how to configure it properly.
The first time you use WooCommerce License manager, you need to manually download and install it. Then, Install Envato Market WordPress Plugin to receive automated updates to future versions.
License keys can be sent for simple products and/or variations.
To enable sending license keys go to the product page, in the bottom there is a new section
added by the plugin to configure the license manager for the product/variation.
There is multiple ways to add license keys to the plugin.




Any fields that you don't need you can leave as the default values.
First you have to enable sending license keys for the product/variation then create a generator rule.
There is 2 ways to create a generator rule for a product/variation.


If "Active" is set to "No" the license manager won't generate any license keys.
License keys can be pre-generated in the page License Manager > License Key Generator

Before adding any license keys to the plugin set your encryption keys.
Using the default encryption keys is not recommended.
After choosing your encryption keys save them somewhere safe, without them license keys added to the plugin can't be decrypted.

Check only one checkbox per row.

License manager have no control over order status, the status of your orders is set by WooCommerce and the used payment gateway. If you want orders to go to completed directly usually setting the product as Virtual and Downloadable (you don't have to attache a file) will do it, but your payment method may override that.

Assign a new license key to the order item:
Replace this license key
Replace order item license keys
Replace order license keys


Using the page License Manager > Export you can export:
This section explain all the API commands that you can use to control your software usage.
The following examples are in PHP but the process is the same for all programming languages, a POST request to the website URL with the required parameters.
// The post url is your WordPress website URL where the plugin is installed
// If the your WordPress installation is in a sub-folder the URL to that sub-folder
// should be used instead. Example: https://domain.ltd/my-sub-folder
$post_url = 'https://domain.ltd/';
$parameters = array(
// The API command
// The fslm_v2_api_request parameter takes one of the following values
// verify, activate, deactivate, details, extra_data
'fslm_v2_api_request' => 'YOUR COMMAND GOES HERE',
// Your API Key
// You can set your API key in the page
// License Manager > Settings > API
'fslm_api_key' => 'YOUR API KEY GOES HERE',
// The License Key
'license_key' => 'YOUR LICENSE KEY GOES HERE',
// The device ID
// The Device ID is optional, but if it is used and the license keys was activated with it
// it becomes required, a license key activated with a Device ID can't be deactivated
// without it and can't be activated again without it.
// The device ID can be anything you want, its role is to identify the "Device",
// "Machine" or "Domain" where the license was activated.
'device_id' => 'YOUR DEVICE ID GOES HERE'
);
Activation/Verification with a Device ID:
If you send an activation request with a valid Device ID (the Device ID that was used to activate the license key the first time) the request will return success, this feature was added to give the developers the option to allow their customers to reactivate the software after the user have deleted the app data for example.
Lets say you have a license key that can be used 1 time, the user have activated a mobile app now the license can't be used again, the user later deletes the app data and tries to activate the app again.
They can't because there is no device ID associated with the license key and the activation limit was reached.
But if you register the Device ID when you active the license key, even after the user deletes the app data they can activate again because with that ID you can confirm that it is the same user on the same device.
Activation/Verification without a Device ID:
If you don't put a Device ID in the parameters when you send the API request you are checking if the license key alone is valid or no.
If you put a Device ID in the parameters you are checking if that combination of License key/Device ID is valid or no.
You can find and change your API key in License Manager > Settings > API
Keeping the default value is not recommended.
The current API version is 2.0, the option to disable version 1.0 is in License Manager > Settings > API
As long as the new feature added to the API does not interfere with the features already available we will keep adding the new features to the current version.
How a version of the API works will never change instead a new version will be added with the option to disable the old versions.
All API version are enabled by default and need to be manually disabled if they are not need.
The following is a PHP example using CURL.
Activating a license key with a Device ID that is already in the database won't decrease the remaining activations number.
// The post url is your WordPress website URL where the plugin is installed
// If the your WordPress installation is in a sub-folder the URL to that sub-folder
// should be used instead. Example: https://domain.ltd/my-sub-folder
$post_url = 'https://domain.ltd/';
$parameters = array(
// The API command
// The fslm_v2_api_request parameter takes one of the following values
// verify, activate, deactivate, details, extra_data
'fslm_v2_api_request' => 'activate',
// Your API Key
// You can set your API key in the page
// License Manager > Settings > API
'fslm_api_key' => '0A9Q5OXT13in3LGjM9F3W',
// The License Key
'license_key' => 'FFFF-FFFF-FFFF-FFFF',
// The device ID
// The Device ID is optional, but if it is used and the license keys was activated with it
// it becomes required, a license key activated with a Device ID can't be deactivated
// without it and can't be activated again without it.
// The device ID can be anything you want, its role is to identify the "Device",
// "Machine" or "Domain" where the license was activated.
'device_id' => 'userdomain.ltd'
);
//url-ify the data for the POST
$fields_string = "";
foreach($parameters as $key=>$value) {
$fields_string .= $key.'='.$value.'&';
}
rtrim($fields_string, '&');
// Open connection
$ch = curl_init();
// Set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, count($parameters));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Execute post
$result = curl_exec($ch);
curl_close($ch);
// Display the request result
echo $result;
{
"result" : "success",
"code" : "300",
"message": "License key activated"
}
{
"result" : "error",
"code" : "350",
"message": "Maximum number of activation reached"
}
{
"result" : "error",
"code" : "550",
"message": "Expired license key"
}
{
"result" : "error",
"code" : "750",
"message": "Device ID required, this license keys was activated with a device ID, a device ID is required to activate it again"
}
{
"result" : "error",
"code" : "100",
"message": "Invalid license key"
}
{
"result" : "error",
"code" : "600",
"message": "Invalid parameters"
}
{
"result" : "error",
"code" : "200",
"message": "Invalid API key"
}
{
"result" : "error",
"code" : "000",
"message": "An error has occurred please retry"
}
The following is a PHP example using CURL.
// The post url is your WordPress website URL where the plugin is installed
// If the your WordPress installation is in a sub-folder the URL to that sub-folder
// should be used instead. Example: https://domain.ltd/my-sub-folder
$post_url = 'https://domain.ltd/';
$parameters = array(
// The API command
// The fslm_v2_api_request parameter takes one of the following values
// verify, activate, deactivate, details, extra_data
'fslm_v2_api_request' => 'deactivate',
// Your API Key
// You can set your API key in the page
// License Manager > Settings > API
'fslm_api_key' => '0A9Q5OXT13in3LGjM9F3W',
// The License Key
'license_key' => 'FFFF-FFFF-FFFF-FFFF',
// The device ID
// The Device ID is optional, but if it is used and the license keys was activated with it
// it becomes required, a license key activated with a Device ID can't be deactivated
// without it and can't be activated again without it.
// The device ID can be anything you want, its role is to identify the "Device",
// "Machine" or "Domain" where the license was activated.
'device_id' => 'userdomain.ltd'
);
//url-ify the data for the POST
$fields_string = "";
foreach($parameters as $key=>$value) {
$fields_string .= $key.'='.$value.'&';
}
rtrim($fields_string, '&');
// Open connection
$ch = curl_init();
// Set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, count($parameters));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Execute post
$result = curl_exec($ch);
curl_close($ch);
// Display the request result
echo $result;
{
"result" : "success",
"code" : "400",
"message": "License key deactivated"
}
{
"result" : "success",
"code" : "450",
"message": "License key already inactive"
}
{
"result" : "error",
"code" : "550",
"message": "Expired license key"
}
{
"result" : "error",
"code" : "700",
"message": "Device ID required, this license keys was activated with a device ID, a device ID is required to deactivate it"
}
{
"result" : "error",
"code" : "100",
"message": "Invalid license key"
}
{
"result" : "error",
"code" : "600",
"message": "Invalid parameters"
}
{
"result" : "error",
"code" : "200",
"message": "Invalid API key"
}
{
"result" : "error",
"code" : "000",
"message": "An error has occurred please retry"
}
The following is a PHP example using CURL.
// The post url is your WordPress website URL where the plugin is installed
// If the your WordPress installation is in a sub-folder the URL to that sub-folder
// should be used instead. Example: https://domain.ltd/my-sub-folder
$post_url = 'https://domain.ltd/';
$parameters = array(
// The API command
// The fslm_v2_api_request parameter takes one of the following values
// verify, activate, deactivate, details, extra_data
'fslm_v2_api_request' => 'verify',
// Your API Key
// You can set your API key in the page
// License Manager > Settings > API
'fslm_api_key' => '0A9Q5OXT13in3LGjM9F3W',
// The License Key
'license_key' => 'FFFF-FFFF-FFFF-FFFF',
// The device ID
// The Device ID is optional, but if it is used and the license keys was activated with it
// it becomes required, a license key activated with a Device ID can't be deactivated
// without it and can't be activated again without it.
// The device ID can be anything you want, its role is to identify the "Device",
// "Machine" or "Domain" where the license was activated.
'device_id' => 'userdomain.ltd'
);
//url-ify the data for the POST
$fields_string = "";
foreach($parameters as $key=>$value) {
$fields_string .= $key.'='.$value.'&';
}
rtrim($fields_string, '&');
// Open connection
$ch = curl_init();
// Set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, count($parameters));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Execute post
$result = curl_exec($ch);
curl_close($ch);
// Display the request result
echo $result;
{
"result" : "success",
"code" : "500",
"message": "Valid license key"
}
{
"result" : "error",
"code" : "550",
"message": "Expired license key"
}
{
"result" : "error",
"code" : "650",
"message": "Invalid device ID"
}
{
"result" : "error",
"code" : "100",
"message": "Invalid license key"
}
{
"result" : "error",
"code" : "600",
"message": "Invalid parameters"
}
{
"result" : "error",
"code" : "200",
"message": "Invalid API key"
}
{
"result" : "error",
"code" : "000",
"message": "An error has occurred please retry"
}
The following is a PHP example using CURL.
// The post url is your WordPress website URL where the plugin is installed
// If the your WordPress installation is in a sub-folder the URL to that sub-folder
// should be used instead. Example: https://domain.ltd/my-sub-folder
$post_url = 'https://domain.ltd/';
$parameters = array(
// The API command
// The fslm_v2_api_request parameter takes one of the following values
// verify, activate, deactivate, details, extra_data
'fslm_v2_api_request' => 'details',
// Your API Key
// You can set your API key in the page
// License Manager > Settings > API
'fslm_api_key' => '0A9Q5OXT13in3LGjM9F3W',
// The License Key
'license_key' => 'FFFF-FFFF-FFFF-FFFF',
// The device ID
// The Device ID is optional, but if it is used and the license keys was activated with it
// it becomes required, a license key activated with a Device ID can't be deactivated
// without it and can't be activated again without it.
// The device ID can be anything you want, its role is to identify the "Device",
// "Machine" or "Domain" where the license was activated.
'device_id' => 'userdomain.ltd'
);
//url-ify the data for the POST
$fields_string = "";
foreach($parameters as $key=>$value) {
$fields_string .= $key.'='.$value.'&';
}
rtrim($fields_string, '&');
// Open connection
$ch = curl_init();
// Set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, count($parameters));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Execute post
$result = curl_exec($ch);
curl_close($ch);
// Display the request result
echo $result;
{
"license_id" : "123",
"product_id" : "123",
"variation_id" : "123", // If variation_id == 0 then it's not a variable product
"license_key" : "FFFF-FFFF-FFFF-FFFF",
"image_license_key" : null,
"license_status" : "sold",
"owner_first_name" : "John",
"owner_last_name" : "Doe",
"owner_email_address" : "name@userdomain.ltd",
"delivre_x_times" : "0",
"remaining_delivre_x_times" : "0",
"max_instance_number" : "1",
"number_use_remaining" : "1",
"activation_date" : null,
"creation_date" : "2019-12-31",
"expiration_date" : "2020-12-31",
"valid" : "0",
"order_id" : "5382",
"sold_date" : "2019-12-31",
"device_id" : "[\"userdomain.ltd\",\"device1234\"]" // After JSON decoding the response, this value should also be JSON decoded
}
The following is a PHP example using CURL.
// The post url is your WordPress website URL where the plugin is installed
// If the your WordPress installation is in a sub-folder the URL to that sub-folder
// should be used instead. Example: https://domain.ltd/my-sub-folder
$post_url = 'https://domain.ltd/';
$parameters = array(
// The API command
// The fslm_v2_api_request parameter takes one of the following values
// verify, activate, deactivate, details, extra_data
'fslm_v2_api_request' => 'extra_data',
// Your API Key
// You can set your API key in the page
// License Manager > Settings > API
'fslm_api_key' => '0A9Q5OXT13in3LGjM9F3W',
// WooCommerce Product ID
'product_id' => '123',
);
//url-ify the data for the POST
$fields_string = "";
foreach($parameters as $key=>$value) {
$fields_string .= $key.'='.$value.'&';
}
rtrim($fields_string, '&');
// Open connection
$ch = curl_init();
// Set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, count($parameters));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Execute post
$result = curl_exec($ch);
curl_close($ch);
// Display the request result
echo $result;
{
"software_name" :"YOUR SOFTWARE NAME",
"software_id" :"YOUR SOFTWARE ID",
"software_version" :"YOUR SOFTWARE VERSION",
"software_author" :"YOUR SOFTWARE AUTHOR",
"software_url" :"YOUR SOFTWARE URL",
"software_last_update" :"LAST UPDATE DATE",
"software_extra_data" : { "key1":"value1", "key2":"value2"} | "STRING VALUE" // The value of this field can be a String or JSON
}
{
"result" : "error",
"code" : "100",
"message": "Invalid license key"
}
{
"result" : "error",
"code" : "200",
"message": "Invalid API key"
}
{
"result" : "success",
"code" : "300",
"message": "License key activated"
}
{
"result" : "error",
"code" : "350",
"message": "Maximum number of activation reached"
}
{
"result" : "success",
"code" : "400",
"message": "License key deactivated"
}
You will get this response when you attempt to deactivate a license key that is already inactive.
{
"result" : "success",
"code" : "450",
"message": "License key already inactive"
}
{
"result" : "error",
"code" : "500",
"message": "Valid license key"
}
{
"result" : "error",
"code" : "550",
"message": "Expired license key"
}
Each API command required certain parameters, if one or more if the required parameters in not sent in the request you will get this error as a response.
{
"result" : "error",
"code" : "600",
"message": "Invalid parameters"
}
License verification with a Device ID will return this error if the sent Device ID is not in the database.
{
"result" : "error",
"code" : "650",
"message": "Invalid device ID"
}
Attempting to deactivate a license key that was activated before with a Device ID without a Device ID will result in this error code.
Only after all the device IDs assigned to a license key are deleted either by disabling them or manually deleting them then the license can be deactivated without a Device ID.
{
"result" : "error",
"code" : "700",
"message": "Device ID required, this license keys was activated with a device ID, a device ID is required to deactivate it"
}
Attempting to activate a license key that was activated before with a Device ID without a Device ID will result in this error code.
Only after all the device IDs assigned to a license key are deleted either by disabling them or manually deleting them then the license can be activated without a Device ID.
{
"result" : "error",
"code" : "750",
"message": "Device ID required, this license keys was activated with a device ID, a device ID is required to activate it again"
}
You will get this response if something goes wrong with the request(example: the database record could not be updated)
{
"result" : "error",
"code" : "000",
"message": "An error has occurred please retry"
}
If there is any Device IDs assigned to a license key they can be manually deleted in the edit license key page.

The plugin includes .po/.pot translation files, I recommend using Loco translator and settings the text domain and file name prefix to "fslm"
Version 4.2.9 – October 26, 2020
- Bugfix
Version 4.2.8 – August 29, 2020
- Bugfix
Version 4.2.7 – August 24, 2020
Added the option to automatically delete license keys that are older than an X number of days.
API license verification bugfix.
Stock Sync: backorders bugfix.
Queue System: a queuing system to prevent orders placed at the same time from getting the same license keys.
Private API: Allows the admin to perform actions that can’t be done using the standard API, like setting a license key as expired. (Feature requested by a buyer, the current version can only be used to expire license keys, more options are coming soon.)
Bugfixes.
The new features can be enabled from the plugins sttings page
Version 4.2.4 - July 1, 2020
- Bulk image upload bug fix.
Version 4.2.3 - June 16, 2020
- Pagination bug fix.
Version 4.2.2 - June 8, 2020
- Added the option to deliver different keys if a license key is set to be delivered multiple times.
- Translation fix.
Version 4.2.1 - March 21, 2020
- Filter by variation.
- Show the number of license keys returned by the filter.
- Ignore Mac OS hidden files when bulk importing image license keys.
Version 4.2 - January XX, 2020
- Bulk delete license keys by product.
- UI Optimization.
- Show variation IDs to fix the issue with WooCommerce not showing the full variation name.
- Show how many times the license key can be used for for keys that can be delivered multiple times.
Version 4.1.8 - August 29, 2019
- API: deactivation with device ID bug fix.
Version 4.1.7 - August 1, 2019
- Added the option enable/disable adding duplicate license keys.
- Minor bug fix.
Version 4.1.6 - June 12, 2019
- Bug fix
Version 4.1.5 - June 10, 2019
- Stock sync runs as background process.
- Fixed admin bar notifications bug.
Version 4.1.3 - May 10, 2019
- Added Device ID to the API
- Bug fixes
Version 4.0 - March 9, 2019
- Fixed pagination buttons not showing correctly in WordPress 5.1
Version 4.0 - February 4, 2019
- Added Stock synchronization: now you can sync available license keys stock with WooCommerce product stock.
- Added the option to automatically change expired license keys status.
- Better back-order support: added more option to the order page so you can replace keys individually or assign new ones to an already existing order.
- Bug fixes.
Version 3.2.2 - January 27, 2019
- Bug fix
Version 3.2.1 - December 25, 2018
- Minor fix
Version 3.2 - November 6, 2018
- Expiration date bug fix
Version 3.1 - October 22, 2018
- Bug fixes and optimizations
Version 3.0 - September 15, 2018
- Backorders support
- Automatically enable sending license keys when a license key is added or imported
- Bulk image license key upload
- Bulk image license key upload progress bar
- Bulk license key generation
- Available license keys count in the product page
- License keys global settings
- Replace order license keys
- API version 2
- Bug fixes
Version 2.4.4 - April 23, 2018
- Bug fix
Version 2.4 - December 11th, 2017
- Minor fix
Version 2.3 - September 11th, 2017
- Added license keys search filters.
- Added the option to disable the second email.
- Added product/variation name filter when adding/editing a license keys.
- Bug fixes
Version 2.1 - January 1st, 2017
- Added the option to deliver license keys as images
- Added custom order status support
- Added License Key encryption
- Added the option to deliver the same key multiple times
- Added customizable Email templates
- Added the option to resend license keys email to the customer
- Added the option to change the license keys assign to an order after purchase
- Extended the API
- Extra product information for API users
- Added the option to make the customer see the license keys in the email or in the
website
- Added the option to display the license keys as text only, image only or both
- New organized user interface
- Corrected the typos
- Minor fixes
Version 2.0.2 - November 5th, 2016
- Extended the API
Version 2.0.1 - August 27th, 2016
- Added Multi-line License key Support
- Removed License Key length limit
- Added the possibility to change 'License key' that appears on the emails to
another text(Example: Purchase Code)
- Minor fixes
Version 2.0 - August 18th, 2016
- Added Product variation support
- Added the possibility to deliver multiple license key per purchase
- Added the possibility to change the meta key 'License key' to another
text(Example: Purchase Code)
- Minor fixes
Version 1.1 - August 4th, 2016
- Translation fix
Version 1.1 - July 28th, 2016
- Added HTML Link License key support
Version 1.0 - June 10th, 2016
- Initial release