Implement version 0.0.1 - Licensed Product type for WooCommerce

Add complete plugin infrastructure for selling software with license keys:

- New "Licensed Product" WooCommerce product type
- License key generation (XXXX-XXXX-XXXX-XXXX format) on order completion
- Domain-based license validation system
- REST API endpoints (validate, status, activate, deactivate)
- Customer My Account "Licenses" page
- Admin license management under WooCommerce > Licenses
- Checkout domain field for licensed products
- Custom database tables for licenses and product versions
- Twig template engine integration
- Full i18n support with German (de_CH) translation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-21 18:55:18 +01:00
parent 8a4802248c
commit 404083f023
22 changed files with 3746 additions and 0 deletions

View File

@@ -0,0 +1,253 @@
# Copyright (C) 2024 Marco Graetsch
# This file is distributed under the GPL-2.0-or-later.
msgid ""
msgstr ""
"Project-Id-Version: WC Licensed Product 0.0.1\n"
"Report-Msgid-Bugs-To: https://src.bundespruefstelle.ch/magdev/wc-licensed-product/issues\n"
"POT-Creation-Date: 2024-01-01T00:00:00+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: wc-licensed-product.php
msgid "%s requires WooCommerce to be installed and active."
msgstr ""
#: wc-licensed-product.php
msgid "WC Licensed Product requires WooCommerce to be installed and active."
msgstr ""
#: src/Product/LicensedProductType.php
msgid "Licensed Product"
msgstr ""
#: src/Product/LicensedProductType.php
msgid "License Settings"
msgstr ""
#: src/Product/LicensedProductType.php
msgid "Max Activations"
msgstr ""
#: src/Product/LicensedProductType.php
msgid "Maximum number of domain activations per license. Default: 1"
msgstr ""
#: src/Product/LicensedProductType.php
msgid "License Validity (Days)"
msgstr ""
#: src/Product/LicensedProductType.php
msgid "Number of days the license is valid. Leave empty for lifetime license."
msgstr ""
#: src/Product/LicensedProductType.php
msgid "Bind to Major Version"
msgstr ""
#: src/Product/LicensedProductType.php
msgid "If enabled, licenses are bound to the major version at purchase time."
msgstr ""
#: src/Product/LicensedProductType.php
msgid "Current Version"
msgstr ""
#: src/Product/LicensedProductType.php
msgid "Current software version (e.g., 1.0.0)"
msgstr ""
#: src/License/LicenseManager.php
msgid "License key not found."
msgstr ""
#: src/License/LicenseManager.php
msgid "This license has been revoked."
msgstr ""
#: src/License/LicenseManager.php
msgid "This license has expired."
msgstr ""
#: src/License/LicenseManager.php
msgid "This license is inactive."
msgstr ""
#: src/License/LicenseManager.php
msgid "This license is not valid for this domain."
msgstr ""
#: src/Api/RestApiController.php
msgid "This license is not valid."
msgstr ""
#: src/Api/RestApiController.php
msgid "License is already activated for this domain."
msgstr ""
#: src/Api/RestApiController.php
msgid "Maximum number of activations reached."
msgstr ""
#: src/Api/RestApiController.php
msgid "Failed to activate license."
msgstr ""
#: src/Api/RestApiController.php
msgid "License activated successfully."
msgstr ""
#: src/Api/RestApiController.php
msgid "License is not activated for this domain."
msgstr ""
#: src/Api/RestApiController.php
msgid "Failed to deactivate license."
msgstr ""
#: src/Api/RestApiController.php
msgid "License deactivated successfully."
msgstr ""
#: src/Checkout/CheckoutController.php
msgid "License Domain"
msgstr ""
#: src/Checkout/CheckoutController.php
msgid "Domain for License Activation"
msgstr ""
#: src/Checkout/CheckoutController.php
msgid "required"
msgstr ""
#: src/Checkout/CheckoutController.php
msgid "example.com"
msgstr ""
#: src/Checkout/CheckoutController.php
msgid "Enter the domain where you will use this license (without http:// or www)."
msgstr ""
#: src/Checkout/CheckoutController.php
msgid "Please enter a domain for your license activation."
msgstr ""
#: src/Checkout/CheckoutController.php
msgid "Please enter a valid domain name."
msgstr ""
#: src/Checkout/CheckoutController.php
msgid "License Domain:"
msgstr ""
#: src/Frontend/AccountController.php
msgid "Please log in to view your licenses."
msgstr ""
#: src/Frontend/AccountController.php
msgid "Licenses"
msgstr ""
#: src/Frontend/AccountController.php
msgid "Unknown Product"
msgstr ""
#: src/Frontend/AccountController.php
msgid "You have no licenses yet."
msgstr ""
#: src/Frontend/AccountController.php
msgid "License Key"
msgstr ""
#: src/Frontend/AccountController.php
msgid "Product"
msgstr ""
#: src/Frontend/AccountController.php
msgid "Domain"
msgstr ""
#: src/Frontend/AccountController.php
msgid "Status"
msgstr ""
#: src/Frontend/AccountController.php
msgid "Expires"
msgstr ""
#: src/Frontend/AccountController.php
msgid "Never"
msgstr ""
#: src/Admin/AdminController.php
msgid "Security check failed."
msgstr ""
#: src/Admin/AdminController.php
msgid "License updated successfully."
msgstr ""
#: src/Admin/AdminController.php
msgid "License deleted successfully."
msgstr ""
#: src/Admin/AdminController.php
msgid "License revoked successfully."
msgstr ""
#: src/Admin/AdminController.php
msgid "Unknown"
msgstr ""
#: src/Admin/AdminController.php
msgid "Guest"
msgstr ""
#: src/Admin/AdminController.php
msgid "Customer"
msgstr ""
#: src/Admin/AdminController.php
msgid "Actions"
msgstr ""
#: src/Admin/AdminController.php
msgid "No licenses found."
msgstr ""
#: src/Admin/AdminController.php
msgid "Are you sure?"
msgstr ""
#: src/Admin/AdminController.php
msgid "Revoke"
msgstr ""
#: src/Admin/AdminController.php
msgid "Are you sure you want to delete this license?"
msgstr ""
#: src/Admin/AdminController.php
msgid "Delete"
msgstr ""
#: src/Admin/AdminController.php
msgid "License"
msgstr ""
#: src/Admin/AdminController.php
msgid "No domain specified"
msgstr ""
#: src/Admin/AdminController.php
msgid "Total licenses:"
msgstr ""
#: src/Admin/AdminController.php
msgid "of"
msgstr ""