madvault / slswc-client
SDK for WordPress plugins and themes to check updates, manage licenses, and enforce DRM against an SLSWC-powered license server.
1.0.0
2026-04-26 09:43 UTC
Requires
- php: >=7.4
This package is not auto-updated.
Last update: 2026-05-11 14:52:19 UTC
README
PHP SDK for WordPress plugins and themes to check for updates, manage licenses, and enforce DRM against an SLSWC-powered license server.
Installation
composer require slswc/client
Usage
Plugin Integration
use SLSWC\Client\Plugin; add_action( 'plugins_loaded', function () { $client = Plugin::get_instance( 'https://your-license-server.com/', __FILE__, array( 'license_key' => get_option( 'my_plugin_license_key', '' ), ) ); $client->init_hooks(); }, 11 );
Theme Integration
use SLSWC\Client\Theme; add_action( 'after_setup_theme', function () { $theme = Theme::get_instance( 'https://your-license-server.com/', WP_CONTENT_DIR . '/themes/my-theme', array( 'license_key' => get_option( 'my_theme_license_key', '' ), ) ); $theme->init_hooks(); } );
Plugin Headers
Add SLSWC headers to your plugin's main file:
/** * Plugin Name: My Plugin * Version: 1.0.0 * Text Domain: my-plugin * * SLSWC: plugin * SLSWC Documentation URL: https://example.com/docs * SLSWC Compatible To: 6.9 */
DRM (Optional)
$client = Plugin::get_instance( 'https://your-license-server.com/', __FILE__, array( 'license_key' => get_option( 'my_plugin_license_key', '' ), 'drm' => array( 'enabled' => true, 'product_name' => 'My Plugin', ), ) );
Documentation
Full integration guides: licenseserver.io/documentation
License
GPL-2.0-or-later