dec4bd609bcdc34fc065b0d1f45f21cdbda3b174
Add product version management: - ProductVersion model and VersionManager class - VersionAdminController with meta box on product edit page - AJAX-based version CRUD (add, delete, toggle status) - JavaScript for version management UI Add email notifications: - LicenseEmailController for order emails - License keys included in order completed emails - Support for both HTML and plain text emails Add REST API rate limiting: - 30 requests per minute per IP - Cloudflare and proxy-aware IP detection - HTTP 429 response with Retry-After header Other changes: - Bump version to 0.0.2 - Update CHANGELOG.md - Add version status styles to admin.css Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WC Licensed Product
A WooCommerce plugin to sell software products using license keys with domain-based validation.
Description
WC Licensed Product adds a new product type "Licensed Product" to WooCommerce, enabling you to sell software with automatically generated license keys. Licenses are bound to specific domains and can be validated through a REST API.
Features
- Licensed Product Type: New WooCommerce product type for software sales
- Automatic License Generation: License keys generated on order completion
- Domain Binding: Licenses are bound to customer-specified domains
- REST API: Public endpoints for license validation and management
- Customer Account: Customers can view their licenses in My Account
- Admin Management: Full CRUD interface for license management
- Version Binding: Optional binding to major software versions
- Expiration Support: Set license validity periods or lifetime licenses
Requirements
- WordPress 6.0 or higher
- WooCommerce 10.0 or higher
- PHP 8.3 or higher
Installation
- Upload the
wc-licensed-productfolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- The plugin will create necessary database tables on activation
Usage
Creating a Licensed Product
- Go to Products > Add New
- Select "Licensed Product" from the product type dropdown
- Configure the product price in the General tab
- Set license options in the "License Settings" tab:
- Max Activations: Number of domains allowed per license
- License Validity: Days until expiration (empty = lifetime)
- Bind to Major Version: Lock license to current major version
- Current Version: Your software's current version
Customer Checkout
When a customer purchases a licensed product, they must enter the domain where they will use the license during checkout.
Viewing Licenses
- Customers: My Account > Licenses
- Administrators: WooCommerce > Licenses
REST API
Validate License
POST /wp-json/wc-licensed-product/v1/validate
Content-Type: application/json
{
"license_key": "XXXX-XXXX-XXXX-XXXX",
"domain": "example.com"
}
Check Status
POST /wp-json/wc-licensed-product/v1/status
Content-Type: application/json
{
"license_key": "XXXX-XXXX-XXXX-XXXX"
}
Activate License
POST /wp-json/wc-licensed-product/v1/activate
Content-Type: application/json
{
"license_key": "XXXX-XXXX-XXXX-XXXX",
"domain": "newdomain.com"
}
Deactivate License
POST /wp-json/wc-licensed-product/v1/deactivate
Content-Type: application/json
{
"license_key": "XXXX-XXXX-XXXX-XXXX",
"domain": "example.com"
}
License Statuses
- Active: License is valid and usable
- Inactive: License has been deactivated
- Expired: License validity period has ended
- Revoked: License has been manually revoked by admin
Support
For issues and feature requests, please visit: https://src.bundespruefstelle.ch/magdev/wc-licensed-product/issues
Author
Marco Graetsch
License
GPL-2.0-or-later
Description
Releases
4
Release 0.7.5
Latest
Languages
PHP
76.8%
JavaScript
11%
Twig
7.3%
CSS
4.9%