Download the PHP package digitalduz/slswc-client without Composer
On this page you can find all versions of the php package digitalduz/slswc-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download digitalduz/slswc-client
More information about digitalduz/slswc-client
Files in digitalduz/slswc-client
Package slswc-client
Short Description Software License Server for WooCommerce
License GPL-2.0-or-later
Informations about the package slswc-client
Software License Server for WooCommerce Client
This is the class file required to be included with your plugin or theme to provide license and update checks.
Usage
Install the SDK using the composer package manager.
composer require digitalduz/slswc-client
Then use the client as follows for a plugin:
$license_server_url
- Is the domain of the license server.
$base_file
- Is the plugin main file for a plugin or the theme root folder for the theme
$license_details
- Is an array of license details. May include plugin details if not set in plugin headers.
Example for plugins:
Example for themes:
Activating the license
This is an example of how to activate the license. You can hook this to a form save after saving the license key.
Plugin headers.
The client also searches for additional theme or plugin headers for information about the plugin, these headers are as follows:
- SLSWC - Specifies whether this is a
plugin
ortheme
and it is also used to distinguish SLSWC plugins/themes from others. - Documentation URL - Link to documentation for this plugin or theme
- Required WP - Minimum version of WordPress required
- Compatible To - Maximum compatible WordPress version
Here is a full example of how to use this in a plugin:
And for a theme:
Put this in functions.php
Add this to style.css