1.Installation #

1.1.WordPress Dashboard #

This is the recommended way of installing any WordPress plugin available on the official plugin repository.

  • Open the WordPress Dashboard of your website
  • Navigate to Plugins → Add new
  • Search for License Manager for WooCommerce using the search bar located on the top-right side of the screen
  • In the displayed search results click on Install Now on the License Manager for WooCommerce card
  • Click on Activate if you wish to activate the plugin immediately

1.2.Manual installation #

To manually install the plugin, follow these steps:

  • Open the plugin website on WordPress.org
  • Download the plugin by clicking the Download button located on the top-right side of the screen
  • Open your WordPress Dashboard
  • Navigate to Plugins → Add new
  • At the top of the screen click on Upload plugin
  • Click on Browse… and select the plugin file you previously downloaded, then click on Install Now
  • Click on Activate plugin if you wish to activate it immediately

2.Setup #

2.1.Cryptographic secrets #

The plugin stores all license keys in an encrypted fashion inside the database. During activation the plugin will create the following directory.

wp-content/uploads/lmfwc-files

Inside this directory, the plugin creates two files (defuse.txt and secret.txt). The contents of these files are used to encrypt, decrypt, and hash all license keys.

Before doing anything else, please create a backup of these two files and store them somewhere safe. If anything happens, and these files are deleted or overwritten, you will permanently lose all license keys stored in your database!

2.2.Security #

The plugin will also create a .htaccess file in the above-mentioned directory. This file is used to disable direct browser access to the folder, preventing unwanted visitors from seeing your cryptographic secrets.

However, if your server is running NGINX instead of Apache, then the file is completely ignored. In this case you can either manually create a NGINX directive, or follow the guide in the optimization subsection (recommended).

We recommend that you move the cryptographic secrets into the configuration file of your WordPress website, also known as „wp-config.php“. This will reduce the amount of requests to the server file system and move the cryptographic secrets to a safer place.

To do this, open the wp-config.php file and add the following lines to it:

 define('LMFWC_PLUGIN_SECRET', 'secret.txt');
define('LMFWC_PLUGIN_DEFUSE', 'defuse.txt'); 

Replace secret.txt and defuse.txt with their file contents, respectively. Afterwards, create a backup of these two files somewhere safe (if you haven’t already) and delete the lmfwc-files directory completely.

If your license keys are not visible anymore, then something went wrong. You can always restore the files and remove the two added lines to revert the changes.

3.Plugin settings #

3.1.General #

The general settings tab has been divided into three sections: License keys, My account, and REST API.

License keys

The “license keys” settings section

The “Obscure licenses” setting allows the user to configure whether license keys will be hidden in the administrator interface (backend). This will prevent anyone from taking a direct look at the plain-text, decrypted license keys.

The “Automatic delivery” setting determines whether license keys will be automatically delivered after the order delivery has been triggered. This is great if you want to run manual checks on the orders before sending out your licenses, however in most scenarios you will probably want to have this setting turned on.

The “Allow duplicates” setting allows the user to add duplicate license keys to the database. When adding a license key, the plugin will no longer check if said license key is already present inside the database.

My account

The “My Account” settings section

The “Enable ‘License keys’” setting allows the user to determine whether the “License keys” section will be displayed for the customers inside their “My account” page.

The “User activation” setting allows the user to determine whether the customers should be able to activate their license keys from the “My account” page.

The “User deactivation” setting allows the user to determine whether the customers should be able to deactivate their license keys from the “My account” page.

REST API

The “REST API” settings section

The “API & SSL” setting determines whether the REST API will be accessible over insecure HTTP connections, instead of the secure HTTPS channel. This should only be used in development or testing/staging environments, never in a productive setting. Leaving this setting on, on a productive website, exposes your API calls to man-in-the-middle attacks.

The “Enable/disable API routes” setting allows the user to individually enable and disable API routes. Always turn off the REST API routes which your application does not use.

 

3.2.Order status #

The order status tab contains settings related to triggering the license key delivery.

The “License key delivery” settings section

The “Define license key delivery” setting allows the user to configure which order status changes will trigger the license key delivery. By default, only “Completed” is enabled.

3.3.REST API keys #

Follow the navigation to License Manager → Settings → REST API keys to open this settings tab. Here you can manage all of your REST API keys. This includes:

  • Adding new REST API keys
  • Editing existing REST API keys
  • Revoking (deleting) REST API keys

3.4.Tools #

Follow the navigation to License Manager → Settings → Tools to open this settings tab. On this page you will find all settings which relate to the license key export.

The “License key export” settings section

4.License keys #

4.1.Overview #

You can view all of your license keys when navigating to the License Manager → License keys page. Here you can also perform a variety of actions on your license keys. Below you’ll find a table explaining the individual fields of the license key overview table.

The “License keys” table

Column Description
License key The license key string
Order The WooCommerce Order to which this license key belongs
Product The WooCommerce Product to which this license key belongs
Customer` The WooCommerce Customer to which this license key belongs
Activation Current number of license activations
Activation Maximum number of arrived license activations
Created at Timestamp of the license key creation date
Expires at Timestamp of the license key expiry date (if available)
Valid for Number of days for which the license key is valid after purchase.
Status The current license key status

4.2.Adding license keys #

There are two ways of adding license keys to the database, either one-by-one or in bulk. Both options can be found when navigating to the License Manager → License keys page.

Options for adding license keys

Adding a single license key

By clicking the “Add new” button displayed in Figure 1, you will be redirected to the form for adding a single license key. Please read through the field descriptions to understand what each of them represent.

Adding a single license key

Importing license keys

If you already have a list of license keys in a compatible format (CSV or TXT), you can add those license keys in bulk, using the „Import” button shown in Figure 3.

Adding license keys in bulk

4.3.Editing license keys #

It is possible to edit any and all license keys, even the ones already delivered to customers – so be careful! First, navigate to the License Manager → License keys page and find the license key you wish to edit. Afterwards, hover and click the „Edit” action link as shown below.

The „Edit“ license key action link

By clicking the action link you will be redirected to a new page, containing the form with the data of the license key as it currently is. Make your changes and click the „Save“ button.

4.4.Exporting license keys #

You can export your license keys in two formats: CSV and PDF. To do so, navigate to the License Manager → License keys page, mark the license keys you wish to export (by ticking their checkboxes) and select either “Export (CSV)” or “Export (PDF)” from the bulk-actions dropdown, shown below.

Available bulk actions

5.Generators #

5.1.Overview #

You can view your generators when navigating to the License Manager → Generators page. Here you can also perform a variety of actions on them. Below you’ll find a table explaining the individual fields of the license key overview table.

The “Generators” table

 

Column Description
Name Short generator description/name
Character map The characters used for license key generation
Number of chunks Number of individual character chunks
Chunk length The length of an individual character chunk
Maximum activation count Number of times the license key can be activated via the API
Separator The separator between the chunks
Prefix Special character added at the beginning of the license key
Suffix Special character added at the end of the license key
Expires in Number of days the license key expires in when bought

 

5.2.Adding generators #

Navigate to the License Manager → Generators page and click the “Add new” button at the top of the page. You will be redirected to the form. Please read the description of every field, so that you understand how each one of them affects the license key.

The “Add generator” form

5.3.Editing generators #

Navigate to the License Manager → Generators page and hover with your mouse over an existing generator. Click the „Edit” action link to open the form.

Editing a generator

5.4.Generating license keys #

By clicking the Generate button at the top of the Generators page, you will be redirected to the Generate license keys page, where you can use a specific generator to freely generate a chosen number of licenses.

The “Generate license keys” form

6.WooCommerce products #

6.1.Simple product #

While editing a simple WooCommerce product, a new data tab inside the product data box will appear. This tab lets you do the following:

  • Set the product to sell license keys
  • Set the amount of license keys to be delivered upon purchase
  • Choose whether to use a generator or not
  • Assign a previously created generator to the product
  • Choose whether to sell license keys from the available stock
  • View the available stock amount

The new “License Manager” WooCommerce product data tab and its options

6.2.Variable product options #

The same options for simple products will also appear for each variation of a variable product. Clicking the “Variations” tab will display the currently available product variations. Simply expand the variation you wish to edit and scroll a bit down, you will find a “License Manager for WooCommerce” section as show below.

The “License Manager for WooCommerce” options for variable products

7.WooCommerce orders #

7.1.Order license keys #

If a WooCommerce order contains licensed products, then the corresponding license keys will be used/generated once the order status is set to “Completed”. These license keys will then be visibly marked as sold/delivered in the license key overview, and inside their corresponding orders. An example of this is shown below; an order which contains two licensed products.

License keys sold by a WooCommerce order are displayed inside the order itself

7.2.Resend license keys #

If you had to edit or replace the license keys for an existing order you can easily email the customer their new license keys. When editing an order, check out the “Send license key(s) to customer” order action on the right-hand side of the screen, as shown below.

License keys sold by a WooCommerce order are displayed inside the order itself

Help Guide Powered by Documentor
Suggest Edit
Scroll to Top