— Documentation
Set Up Your License Server
Everything needed to run License For Envato as your own license server, from install to REST endpoints.
Requirements
License For Envato runs on WordPress 6.0 or higher with PHP 7.2 or higher. The Pro add-on additionally requires the free plugin at version 1.3.0 or newer, and will show an admin notice if the free plugin is missing or inactive.
1. Install and connect Envato
Install the free plugin, then open License Envato → Settings and paste your Envato personal token. That is the entire server setup. If you are running Pro, activate it after the free plugin and enter your Pro license key on the Pro License tab.
2. Add the integration class to your product
Copy the provided PHP integration class into the theme or plugin you sell, then point it at your server URL. The class handles the activation request and stores the returned token.
3. Show the activation form
Render the activation and deactivation form on your product settings page. Buyers paste their Envato purchase code, the server validates it against the official Envato API, and the domain is registered against that code.
Configuring the Pro license server URL
The Pro add-on validates its own license against a license server. It defaults to a local development URL, so set the production URL in wp-config.php:
define( 'LICENSE_ENVATO_PRO_API_URL', 'https://license.example.com' );
You can also change it at runtime with the license_envato_pro_api_url filter.
REST endpoints
Pro exposes token-authenticated endpoints that buyer sites poll for updates, plus the license endpoints used by the Pro plugin itself.
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /licenseenvato/v1/update-check | Buyer site checks for a newer version. Body: token, itemid, optional version. |
| GET | /licenseenvato/v1/download | Downloads the update ZIP. Query: token, itemid. |
| POST | {base}/api/license/activate | Activates a Pro license. Body: license_key, domain. |
| POST | {base}/api/license/deactivate | Deactivates a Pro license. Body: license_key, domain. |
Developer hooks
The free plugin exposes extension points that the Pro add-on consumes. You can use the same hooks in your own code.
| Hook | Type | Purpose |
|---|---|---|
license_envato_activate_override | filter | Take over activation verification, used for multi-domain logic. |
license_envato_deactive_override | filter | Take over deactivation for Pro-issued tokens. |
license_envato_license_activated | action | Fires on every activation. Used for notifications and logging. |
license_envato_license_deactivated | action | Fires on every deactivation. |
How Pro stores extra activations
The first activation for a purchase code always lives in the free plugin's own table. Extra domain activations are stored separately by Pro, so if you deactivate the Pro add-on your licensing degrades gracefully back to single-domain behaviour rather than breaking.
Where the settings live
All Pro configuration sits under WP Admin → License Envato → Settings, split across the Pro License and Pro Settings tabs.
✦ Let's Build Something Better
Still stuck?
Send us the details and we will help you get your license server running.
