You've already forked wc-licensed-product-client
Add update-check endpoint support (v0.2.1)
Implement /update-check endpoint aligned with remote OpenAPI spec: - Add checkForUpdates() method to LicenseClientInterface - Add UpdateInfo DTO for update check responses - Add ProductNotFoundException for product_not_found error - Update local openapi.json to v0.4.0 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ composer require magdev/wc-licensed-product-client
|
||||
- License validation against domains
|
||||
- License activation on domains
|
||||
- License status checking
|
||||
- Plugin update checking
|
||||
- Comprehensive exception handling
|
||||
- Code integrity verification
|
||||
- Built on Symfony HttpClient
|
||||
@@ -52,6 +53,12 @@ echo "Status: " . $status->status->value;
|
||||
// Activate a license
|
||||
$result = $client->activate('ABCD-1234-EFGH-5678', 'example.com');
|
||||
echo "Activated: " . ($result->success ? 'Yes' : 'No');
|
||||
|
||||
// Check for updates
|
||||
$updateInfo = $client->checkForUpdates('ABCD-1234-EFGH-5678', 'example.com', 'my-plugin', '1.0.0');
|
||||
if ($updateInfo->updateAvailable) {
|
||||
echo "New version available: " . $updateInfo->version;
|
||||
}
|
||||
```
|
||||
|
||||
### With Logging
|
||||
@@ -160,6 +167,7 @@ This client interacts with the following WooCommerce Licensed Product API endpoi
|
||||
- **POST /validate** - Validate a license key for a specific domain
|
||||
- **POST /status** - Get detailed license status information
|
||||
- **POST /activate** - Activate a license on a domain
|
||||
- **POST /update-check** - Check for plugin updates
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user