Fix license generation and checkout domain field bugs

- Add WooCommerce Checkout Blocks support for domain field
- Create CheckoutBlocksIntegration for block-based checkout
- Create StoreApiExtension for Store API domain handling
- Add checkout-blocks.js for frontend domain field in blocks
- Fix LicenseManager product type check in generateLicense()
- Add multiple order status hooks for reliable license generation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-21 21:58:54 +01:00
parent 182dabebed
commit 319dfe357a
6 changed files with 427 additions and 3 deletions

View File

@@ -56,10 +56,15 @@ class LicenseManager
}
$product = wc_get_product($productId);
if (!$product instanceof LicensedProduct) {
if (!$product || !$product->is_type('licensed')) {
return null;
}
// Ensure we have the LicensedProduct instance for type hints
if (!$product instanceof LicensedProduct) {
$product = new LicensedProduct($productId);
}
// Generate unique license key
$licenseKey = $this->generateLicenseKey();
while ($this->getLicenseByKey($licenseKey)) {