6 Commits

Author SHA1 Message Date
962368d35f Update translations for v0.5.7
- Updated POT template with 388 strings
- All German (de_CH) strings translated
- Recompiled .mo file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:55:18 +01:00
4dcace6f06 Remove Default prefix from settings labels (v0.5.7)
- Max Activations (was "Default Max Activations")
- License Validity (Days) (was "Default License Validity (Days)")
- Bind to Major Version (was "Default Bind to Major Version")

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:54:31 +01:00
62aecc0240 Add release package v0.5.6
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:38:54 +01:00
1f676556f2 Update translations for v0.5.6
- Regenerated .pot template
- Updated German (de_CH) translations (391 strings)
- Fixed duplicate translation entries
- Compiled .mo file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:36:53 +01:00
5f51aafe3b Fix License Settings tab visibility and update README (v0.5.6)
- License Settings tab now only shows for licensed and licensed-variable product types
- Fixed CSS that forced show_if_licensed to always display
- Improved JavaScript for proper tab show/hide on product type change
- Updated README.md with complete v0.5.x feature documentation:
  - Variable Licensed Products
  - Multi-Domain Licensing
  - Per-License Customer Secrets
  - Download Statistics
  - Configurable Rate Limiting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:29:56 +01:00
279b0d5dd6 Add release package v0.5.5
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 17:10:52 +01:00
13 changed files with 285 additions and 229 deletions

View File

@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.5.7] - 2026-01-27
### Changed
- Removed "Default" prefix from setting labels on Default Settings page for cleaner UI
- Labels now read "Max Activations", "License Validity (Days)", and "Bind to Major Version"
## [0.5.6] - 2026-01-27
### Fixed
- License Settings tab now only shows for Licensed Product and Licensed Variable Product types
- Previously the tab was visible on all product types due to CSS `!important` override
### Changed
- Improved JavaScript for License Settings tab visibility handling on product type change
- Updated README.md with complete feature documentation for v0.5.x features:
- Variable Licensed Products
- Multi-Domain Licensing
- Per-License Customer Secrets
- Download Statistics
- Configurable Rate Limiting
## [0.5.5] - 2026-01-26
### Fixed

View File

@@ -11,29 +11,34 @@ WC Licensed Product adds a new product type "Licensed Product" to WooCommerce, e
### Core Features
- **Licensed Product Type**: New WooCommerce product type for software sales
- **Variable Licensed Products**: Create product variations with different license durations (monthly, yearly, lifetime)
- **Automatic License Generation**: License keys generated on order completion (format: XXXX-XXXX-XXXX-XXXX)
- **Domain Binding**: Licenses are bound to customer-specified domains
- **Multi-Domain Licensing**: Customers can purchase multiple licenses for different domains in a single order
- **REST API**: Public endpoints for license validation and management
- **Response Signing**: Optional HMAC-SHA256 cryptographic signatures for API responses
- **Per-License Secrets**: Each customer receives a unique verification secret for their license
- **Version Binding**: Optional binding to major software versions
- **Expiration Support**: Set license validity periods or lifetime licenses
- **Rate Limiting**: API endpoints protected with rate limiting (30 requests/minute)
- **Rate Limiting**: API endpoints protected with configurable rate limiting (default: 30 requests/minute)
- **Trusted Proxy Support**: Configurable trusted proxies for accurate rate limiting behind CDNs
- **Checkout Blocks**: Full support for WooCommerce Checkout Blocks (default since WC 8.3+)
- **Self-Licensing**: The plugin can validate its own license (for commercial distribution)
### Customer Features
- **My Account Licenses**: Customers can view their licenses in My Account
- **My Account Licenses**: Customers can view their licenses in My Account (grouped by product)
- **License Transfers**: Customers can transfer licenses to new domains
- **Secure Downloads**: Download purchased software versions with license verification
- **Version History**: Access to older versions with collapsible download section
- **Copy to Clipboard**: Easy license key copying
- **API Verification Secret**: Per-license secret displayed for secure API integration
### Admin Features
- **License Management**: Full CRUD interface for license management
- **License Dashboard**: Statistics and analytics (WooCommerce > Reports > Licenses)
- **Dashboard Widget**: License statistics on WordPress admin dashboard
- **Dashboard Widgets**: License statistics and download statistics on WordPress admin dashboard
- **Search & Filtering**: Search by license key, domain, status, or product
- **Live Search**: AJAX-powered instant search results
- **Inline Editing**: Edit license status, expiry, and domain directly in the list
@@ -41,10 +46,12 @@ WC Licensed Product adds a new product type "Licensed Product" to WooCommerce, e
- **License Transfer**: Transfer licenses to new domains
- **CSV Export/Import**: Export and import licenses via CSV
- **Order Integration**: View and manage licenses directly from order pages
- **Generate Licenses**: Manually generate licenses for admin-created orders
- **Expiration Warnings**: Automatic email notifications before license expiration
- **Auto-Expire**: Daily cron job automatically expires licenses past their expiration date
- **License Testing**: Test licenses against the API directly from admin interface
- **Version Management**: Manage multiple versions per product with file attachments
- **Download Tracking**: Track download counts per version with statistics widget
- **SHA256 Checksums**: File integrity verification with SHA256 hash display
- **Global Settings**: Default license settings via WooCommerce settings tab
- **WooCommerce HPOS**: Compatible with High-Performance Order Storage
@@ -66,13 +73,27 @@ WC Licensed Product adds a new product type "Licensed Product" to WooCommerce, e
### Creating a Licensed Product
1. Go to Products > Add New
2. Select "Licensed Product" from the product type dropdown
2. Select "Licensed Product" from the product type dropdown (or "Licensed Variable Product" for different license durations)
3. Configure the product price in the General tab
4. 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
### Creating Variable Licensed Products
For selling licenses with different durations (monthly, yearly, lifetime):
1. Go to Products > Add New
2. Select "Licensed Variable Product" from the product type dropdown
3. Create variations as you would for any variable product (e.g., by "License Duration")
4. For each variation, set:
- **Variation Price**: Different prices for different durations
- **License Duration (Days)**: Days until expiration (0 = lifetime)
- **Max Activations**: Override parent product setting if needed
Duration labels (Monthly, Yearly, Lifetime) are automatically displayed at checkout.
### Managing Product Versions
1. Edit a Licensed Product
@@ -84,7 +105,8 @@ WC Licensed Product adds a new product type "Licensed Product" to WooCommerce, e
1. Go to WooCommerce > Settings > Licensed Products
2. Set default values for Max Activations, License Validity, and Version Binding
3. Per-product settings override these defaults
3. Enable Multi-Domain Licensing to allow multiple licenses per cart item
4. Per-product settings override these defaults
### Customer Checkout
@@ -144,6 +166,18 @@ define('WC_LICENSE_TRUSTED_PROXIES', 'CLOUDFLARE,10.0.0.1');
**Note**: Only configure trusted proxies if you actually use them. Without this configuration, rate limiting is more secure against IP spoofing attacks.
### Configurable Rate Limiting
The default rate limit is 30 requests per 60 seconds. You can customize this:
```php
// Requests allowed per window (default: 30)
define('WC_LICENSE_RATE_LIMIT', 60);
// Window duration in seconds (default: 60)
define('WC_LICENSE_RATE_WINDOW', 120);
```
## REST API
Full API documentation available in `openapi.json` (OpenAPI 3.1 specification).
@@ -173,6 +207,8 @@ openssl rand -hex 32
The signature prevents man-in-the-middle attacks and ensures response integrity. Use the `magdev/wc-licensed-product-client` Composer package with the `SecureLicenseClient` class to automatically verify signatures.
**Per-License Customer Secrets**: Each customer receives a unique verification secret derived from their license key. This secret is displayed in their account page under "API Verification Secret" and can be used with the client library instead of sharing the master server secret.
### Client Libraries & Examples
**PHP (Recommended):** Install the official client library via Composer:

View File

@@ -50,9 +50,10 @@ code.file-hash {
color: #666;
}
/* License Product Tab */
#woocommerce-product-data .show_if_licensed {
display: block !important;
/* License Product Tab - Hidden by default, shown via JS based on product type */
#woocommerce-product-data .show_if_licensed,
#woocommerce-product-data .show_if_licensed-variable {
display: none;
}
#woocommerce-product-data .hide_if_licensed {

View File

@@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: WC Licensed Product 0.5.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-26 17:06+0100\n"
"Report-Msgid-Bugs-To: magdev3.0@gmail.com\n"
"POT-Creation-Date: 2026-01-27 11:54+0100\n"
"PO-Revision-Date: 2026-01-25T18:30:00+00:00\n"
"Last-Translator: Marco Graetsch <magdev3.0@gmail.com>\n"
"Language-Team: German (Switzerland) <de_CH@li.org>\n"
@@ -310,10 +310,11 @@ msgstr "Speichern"
#: src/Admin/AdminController.php:1373 src/Admin/AdminController.php:1613
#: src/Admin/DashboardWidgetController.php:136
#: src/Admin/OrderLicenseController.php:260
#: src/Admin/SettingsController.php:192 src/Product/LicensedProductType.php:136
#: src/Product/LicensedProductType.php:184
#: src/Product/LicensedProductType.php:379
#: src/Admin/SettingsController.php:192
#: src/Product/LicensedProductVariation.php:139
#: src/Product/LicensedProductType.php:136
#: src/Product/LicensedProductType.php:184
#: src/Product/LicensedProductType.php:385
#: src/Frontend/AccountController.php:286
msgid "Lifetime"
msgstr "Lebenslang"
@@ -1165,17 +1166,18 @@ msgstr ""
"Diese Einstellungen dienen als Standard für neue lizensierte Produkte. "
"Individuelle Produkteinstellungen überschreiben diese Standards."
#: src/Admin/SettingsController.php:176
msgid "Default Max Activations"
msgstr "Standard Max. Aktivierungen"
#: src/Admin/SettingsController.php:176 src/Product/LicensedProductType.php:154
#: src/Product/LicensedProductType.php:402
msgid "Max Activations"
msgstr "Max. Aktivierungen"
#: src/Admin/SettingsController.php:178
msgid "Default maximum number of domain activations per license."
msgstr "Standard maximale Anzahl der Domain-Aktivierungen pro Lizenz."
#: src/Admin/SettingsController.php:187
msgid "Default License Validity (Days)"
msgstr "Standard Lizenz-Gültigkeit (Tage)"
#: src/Admin/SettingsController.php:187 src/Product/LicensedProductType.php:172
msgid "License Validity (Days)"
msgstr "Lizenz-Gültigkeit (Tage)"
#: src/Admin/SettingsController.php:189
msgid ""
@@ -1185,9 +1187,9 @@ msgstr ""
"Standard Anzahl Tage, die eine Lizenz gültig ist. Leer lassen oder auf 0 "
"setzen für lebenslange Lizenzen."
#: src/Admin/SettingsController.php:199
msgid "Default Bind to Major Version"
msgstr "Standard An Hauptversion binden"
#: src/Admin/SettingsController.php:199 src/Product/LicensedProductType.php:190
msgid "Bind to Major Version"
msgstr "An Hauptversion binden"
#: src/Admin/SettingsController.php:201
msgid ""
@@ -1441,97 +1443,6 @@ msgstr "Anhangs-Datei nicht gefunden."
msgid "File checksum does not match. Expected: %1$s, Got: %2$s"
msgstr "Datei-Prüfsumme stimmt nicht überein. Erwartet: %1$s, Erhalten: %2$s"
#: src/Product/LicensedProductType.php:72
msgid "Licensed Product"
msgstr "Lizensiertes Produkt"
#: src/Product/LicensedProductType.php:73
msgid "Licensed Variable Product"
msgstr "Lizensiertes variables Produkt"
#: src/Product/LicensedProductType.php:108
msgid "License Settings"
msgstr "Lizenz-Einstellungen"
#: src/Product/LicensedProductType.php:135
#: src/Product/LicensedProductType.php:378
#, php-format
msgid "%d days"
msgstr "%d Tage"
#: src/Product/LicensedProductType.php:145
#, php-format
msgid "Leave fields empty to use default settings from %s."
msgstr "Felder leer lassen, um Standardeinstellungen von %s zu verwenden."
#: src/Product/LicensedProductType.php:147
msgid "WooCommerce > Settings > Licensed Products"
msgstr "WooCommerce > Einstellungen > Lizensierte Produkte"
#: src/Product/LicensedProductType.php:154
#: src/Product/LicensedProductType.php:396
msgid "Max Activations"
msgstr "Max. Aktivierungen"
#: src/Product/LicensedProductType.php:157
#, php-format
msgid "Maximum number of domain activations per license. Default: %d"
msgstr "Maximale Anzahl der Domain-Aktivierungen pro Lizenz. Standard: %d"
#: src/Product/LicensedProductType.php:172
msgid "License Validity (Days)"
msgstr "Lizenz-Gültigkeit (Tage)"
#: src/Product/LicensedProductType.php:175
#, php-format
msgid "Number of days the license is valid. Leave empty for default (%s)."
msgstr "Anzahl Tage, die die Lizenz gültig ist. Leer lassen für Standard (%s)."
#: src/Product/LicensedProductType.php:190
msgid "Bind to Major Version"
msgstr "An Hauptversion binden"
#: src/Product/LicensedProductType.php:193
#, php-format
msgid ""
"If enabled, licenses are bound to the major version at purchase time. "
"Default: %s"
msgstr ""
"Falls aktiviert, werden Lizenzen an die Hauptversion zum Kaufzeitpunkt "
"gebunden. Standard: %s"
#: src/Product/LicensedProductType.php:194
msgid "Yes"
msgstr "Ja"
#: src/Product/LicensedProductType.php:194
msgid "No"
msgstr "Nein"
#: src/Product/LicensedProductType.php:321
msgid "Version:"
msgstr "Version:"
#: src/Product/LicensedProductType.php:349
msgid "Licensed products are always virtual"
msgstr "Lizenzierte Produkte sind immer virtuell"
#: src/Product/LicensedProductType.php:351
msgid "Virtual"
msgstr "Virtuell"
#: src/Product/LicensedProductType.php:384
msgid "License Duration (Days)"
msgstr "Lizenz-Gültigkeit (Tage)"
#: src/Product/LicensedProductType.php:393
msgid "Leave empty for parent default. 0 = Lifetime."
msgstr "Leer lassen für übergeordneten Standard. 0 = Lebenslang."
#: src/Product/LicensedProductType.php:405
msgid "Leave empty for parent default."
msgstr "Leer lassen für übergeordneten Standard."
#: src/Product/LicensedProductVariation.php:143
msgid "Monthly"
msgstr "Monatlich"
@@ -1551,6 +1462,84 @@ msgid_plural "%d days"
msgstr[0] "%d Tag"
msgstr[1] "%d Tage"
#: src/Product/LicensedProductType.php:72
msgid "Licensed Product"
msgstr "Lizensiertes Produkt"
#: src/Product/LicensedProductType.php:73
msgid "Licensed Variable Product"
msgstr "Lizensiertes variables Produkt"
#: src/Product/LicensedProductType.php:108
msgid "License Settings"
msgstr "Lizenz-Einstellungen"
#: src/Product/LicensedProductType.php:135
#: src/Product/LicensedProductType.php:384
#, php-format
msgid "%d days"
msgstr "%d Tage"
#: src/Product/LicensedProductType.php:145
#, php-format
msgid "Leave fields empty to use default settings from %s."
msgstr "Felder leer lassen, um Standardeinstellungen von %s zu verwenden."
#: src/Product/LicensedProductType.php:147
msgid "WooCommerce > Settings > Licensed Products"
msgstr "WooCommerce > Einstellungen > Lizensierte Produkte"
#: src/Product/LicensedProductType.php:157
#, php-format
msgid "Maximum number of domain activations per license. Default: %d"
msgstr "Maximale Anzahl der Domain-Aktivierungen pro Lizenz. Standard: %d"
#: src/Product/LicensedProductType.php:175
#, php-format
msgid "Number of days the license is valid. Leave empty for default (%s)."
msgstr "Anzahl Tage, die die Lizenz gültig ist. Leer lassen für Standard (%s)."
#: src/Product/LicensedProductType.php:193
#, php-format
msgid ""
"If enabled, licenses are bound to the major version at purchase time. "
"Default: %s"
msgstr ""
"Falls aktiviert, werden Lizenzen an die Hauptversion zum Kaufzeitpunkt "
"gebunden. Standard: %s"
#: src/Product/LicensedProductType.php:194
msgid "Yes"
msgstr "Ja"
#: src/Product/LicensedProductType.php:194
msgid "No"
msgstr "Nein"
#: src/Product/LicensedProductType.php:327
msgid "Version:"
msgstr "Version:"
#: src/Product/LicensedProductType.php:355
msgid "Licensed products are always virtual"
msgstr "Lizenzierte Produkte sind immer virtuell"
#: src/Product/LicensedProductType.php:357
msgid "Virtual"
msgstr "Virtuell"
#: src/Product/LicensedProductType.php:390
msgid "License Duration (Days)"
msgstr "Lizenz-Gültigkeit (Tage)"
#: src/Product/LicensedProductType.php:399
msgid "Leave empty for parent default. 0 = Lifetime."
msgstr "Leer lassen für übergeordneten Standard. 0 = Lebenslang."
#: src/Product/LicensedProductType.php:411
msgid "Leave empty for parent default."
msgstr "Leer lassen für übergeordneten Standard."
#: src/Frontend/DownloadController.php:77
#: src/Frontend/DownloadController.php:101
msgid "Invalid download link."
@@ -1916,6 +1905,15 @@ msgstr ""
"WC Licensed Product benötigt WooCommerce als installierte und aktivierte "
"Erweiterung."
#~ msgid "Default Max Activations"
#~ msgstr "Standard Max. Aktivierungen"
#~ msgid "Default License Validity (Days)"
#~ msgstr "Standard Lizenz-Gültigkeit (Tage)"
#~ msgid "Default Bind to Major Version"
#~ msgstr "Standard An Hauptversion binden"
#~ msgid "API Verification Secret"
#~ msgstr "API-Verifizierungs-Secret"

View File

@@ -1,14 +1,14 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the wc-licensed-product package.
# This file is distributed under the same license as the WC Licensed Product package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: wc-licensed-product 0.5.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-26 17:06+0100\n"
"Project-Id-Version: WC Licensed Product 0.5.7\n"
"Report-Msgid-Bugs-To: magdev3.0@gmail.com\n"
"POT-Creation-Date: 2026-01-27 11:54+0100\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"
@@ -303,10 +303,11 @@ msgstr ""
#: src/Admin/AdminController.php:1373 src/Admin/AdminController.php:1613
#: src/Admin/DashboardWidgetController.php:136
#: src/Admin/OrderLicenseController.php:260
#: src/Admin/SettingsController.php:192 src/Product/LicensedProductType.php:136
#: src/Product/LicensedProductType.php:184
#: src/Product/LicensedProductType.php:379
#: src/Admin/SettingsController.php:192
#: src/Product/LicensedProductVariation.php:139
#: src/Product/LicensedProductType.php:136
#: src/Product/LicensedProductType.php:184
#: src/Product/LicensedProductType.php:385
#: src/Frontend/AccountController.php:286
msgid "Lifetime"
msgstr ""
@@ -1132,16 +1133,17 @@ msgid ""
"product settings override these defaults."
msgstr ""
#: src/Admin/SettingsController.php:176
msgid "Default Max Activations"
#: src/Admin/SettingsController.php:176 src/Product/LicensedProductType.php:154
#: src/Product/LicensedProductType.php:402
msgid "Max Activations"
msgstr ""
#: src/Admin/SettingsController.php:178
msgid "Default maximum number of domain activations per license."
msgstr ""
#: src/Admin/SettingsController.php:187
msgid "Default License Validity (Days)"
#: src/Admin/SettingsController.php:187 src/Product/LicensedProductType.php:172
msgid "License Validity (Days)"
msgstr ""
#: src/Admin/SettingsController.php:189
@@ -1150,8 +1152,8 @@ msgid ""
"lifetime licenses."
msgstr ""
#: src/Admin/SettingsController.php:199
msgid "Default Bind to Major Version"
#: src/Admin/SettingsController.php:199 src/Product/LicensedProductType.php:190
msgid "Bind to Major Version"
msgstr ""
#: src/Admin/SettingsController.php:201
@@ -1392,95 +1394,6 @@ msgstr ""
msgid "File checksum does not match. Expected: %1$s, Got: %2$s"
msgstr ""
#: src/Product/LicensedProductType.php:72
msgid "Licensed Product"
msgstr ""
#: src/Product/LicensedProductType.php:73
msgid "Licensed Variable Product"
msgstr ""
#: src/Product/LicensedProductType.php:108
msgid "License Settings"
msgstr ""
#: src/Product/LicensedProductType.php:135
#: src/Product/LicensedProductType.php:378
#, php-format
msgid "%d days"
msgstr ""
#: src/Product/LicensedProductType.php:145
#, php-format
msgid "Leave fields empty to use default settings from %s."
msgstr ""
#: src/Product/LicensedProductType.php:147
msgid "WooCommerce > Settings > Licensed Products"
msgstr ""
#: src/Product/LicensedProductType.php:154
#: src/Product/LicensedProductType.php:396
msgid "Max Activations"
msgstr ""
#: src/Product/LicensedProductType.php:157
#, php-format
msgid "Maximum number of domain activations per license. Default: %d"
msgstr ""
#: src/Product/LicensedProductType.php:172
msgid "License Validity (Days)"
msgstr ""
#: src/Product/LicensedProductType.php:175
#, php-format
msgid "Number of days the license is valid. Leave empty for default (%s)."
msgstr ""
#: src/Product/LicensedProductType.php:190
msgid "Bind to Major Version"
msgstr ""
#: src/Product/LicensedProductType.php:193
#, php-format
msgid ""
"If enabled, licenses are bound to the major version at purchase time. "
"Default: %s"
msgstr ""
#: src/Product/LicensedProductType.php:194
msgid "Yes"
msgstr ""
#: src/Product/LicensedProductType.php:194
msgid "No"
msgstr ""
#: src/Product/LicensedProductType.php:321
msgid "Version:"
msgstr ""
#: src/Product/LicensedProductType.php:349
msgid "Licensed products are always virtual"
msgstr ""
#: src/Product/LicensedProductType.php:351
msgid "Virtual"
msgstr ""
#: src/Product/LicensedProductType.php:384
msgid "License Duration (Days)"
msgstr ""
#: src/Product/LicensedProductType.php:393
msgid "Leave empty for parent default. 0 = Lifetime."
msgstr ""
#: src/Product/LicensedProductType.php:405
msgid "Leave empty for parent default."
msgstr ""
#: src/Product/LicensedProductVariation.php:143
msgid "Monthly"
msgstr ""
@@ -1500,6 +1413,82 @@ msgid_plural "%d days"
msgstr[0] ""
msgstr[1] ""
#: src/Product/LicensedProductType.php:72
msgid "Licensed Product"
msgstr ""
#: src/Product/LicensedProductType.php:73
msgid "Licensed Variable Product"
msgstr ""
#: src/Product/LicensedProductType.php:108
msgid "License Settings"
msgstr ""
#: src/Product/LicensedProductType.php:135
#: src/Product/LicensedProductType.php:384
#, php-format
msgid "%d days"
msgstr ""
#: src/Product/LicensedProductType.php:145
#, php-format
msgid "Leave fields empty to use default settings from %s."
msgstr ""
#: src/Product/LicensedProductType.php:147
msgid "WooCommerce > Settings > Licensed Products"
msgstr ""
#: src/Product/LicensedProductType.php:157
#, php-format
msgid "Maximum number of domain activations per license. Default: %d"
msgstr ""
#: src/Product/LicensedProductType.php:175
#, php-format
msgid "Number of days the license is valid. Leave empty for default (%s)."
msgstr ""
#: src/Product/LicensedProductType.php:193
#, php-format
msgid ""
"If enabled, licenses are bound to the major version at purchase time. "
"Default: %s"
msgstr ""
#: src/Product/LicensedProductType.php:194
msgid "Yes"
msgstr ""
#: src/Product/LicensedProductType.php:194
msgid "No"
msgstr ""
#: src/Product/LicensedProductType.php:327
msgid "Version:"
msgstr ""
#: src/Product/LicensedProductType.php:355
msgid "Licensed products are always virtual"
msgstr ""
#: src/Product/LicensedProductType.php:357
msgid "Virtual"
msgstr ""
#: src/Product/LicensedProductType.php:390
msgid "License Duration (Days)"
msgstr ""
#: src/Product/LicensedProductType.php:399
msgid "Leave empty for parent default. 0 = Lifetime."
msgstr ""
#: src/Product/LicensedProductType.php:411
msgid "Leave empty for parent default."
msgstr ""
#: src/Frontend/DownloadController.php:77
#: src/Frontend/DownloadController.php:101
msgid "Invalid download link."

Binary file not shown.

View File

@@ -0,0 +1 @@
8c37e1c68eb6031c37d35adc516a492abdbea8498bdc3e3fc7d93eda380a4fe0 wc-licensed-product-0.5.5.zip

Binary file not shown.

View File

@@ -0,0 +1 @@
4d35a319fe4cb4e7055bae17fc030487ca05e5e9ac905f76d0ac62002bde4336 releases/wc-licensed-product-0.5.6.zip

View File

@@ -173,7 +173,7 @@ final class SettingsController
'id' => 'wc_licensed_product_section_defaults',
],
'default_max_activations' => [
'name' => __('Default Max Activations', 'wc-licensed-product'),
'name' => __('Max Activations', 'wc-licensed-product'),
'type' => 'number',
'desc' => __('Default maximum number of domain activations per license.', 'wc-licensed-product'),
'id' => 'wc_licensed_product_default_max_activations',
@@ -184,7 +184,7 @@ final class SettingsController
],
],
'default_validity_days' => [
'name' => __('Default License Validity (Days)', 'wc-licensed-product'),
'name' => __('License Validity (Days)', 'wc-licensed-product'),
'type' => 'number',
'desc' => __('Default number of days a license is valid. Leave empty or set to 0 for lifetime licenses.', 'wc-licensed-product'),
'id' => 'wc_licensed_product_default_validity_days',
@@ -196,7 +196,7 @@ final class SettingsController
],
],
'default_bind_to_version' => [
'name' => __('Default Bind to Major Version', 'wc-licensed-product'),
'name' => __('Bind to Major Version', 'wc-licensed-product'),
'type' => 'checkbox',
'desc' => __('If enabled, licenses are bound to the major version at purchase time by default.', 'wc-licensed-product'),
'id' => 'wc_licensed_product_default_bind_to_version',

View File

@@ -202,22 +202,28 @@ final class LicensedProductType
<script type="text/javascript">
jQuery(document).ready(function($) {
// Show/hide panels based on product type
$('select#product-type').change(function() {
if ($(this).val() === 'licensed') {
function toggleLicensedProductOptions() {
var productType = $('#product-type').val();
var isLicensed = productType === 'licensed';
var isLicensedVariable = productType === 'licensed-variable';
if (isLicensed || isLicensedVariable) {
$('.show_if_licensed').show();
$('.show_if_licensed-variable').show();
$('.general_options').show();
$('.pricing').show();
$('.general_tab').show();
} else {
$('.show_if_licensed').hide();
$('.show_if_licensed-variable').hide();
}
}
}).change();
// Show general tab for licensed products
$('#product-type').on('change', function() {
if ($(this).val() === 'licensed') {
$('.general_tab').show();
}
});
// Initial state on page load
toggleLicensedProductOptions();
// On product type change
$('#product-type').on('change', toggleLicensedProductOptions);
});
</script>
<?php

View File

@@ -3,7 +3,7 @@
* Plugin Name: WooCommerce Licensed Product
* Plugin URI: https://src.bundespruefstelle.ch/magdev/wc-licensed-product
* Description: WooCommerce plugin to sell software products using license keys with domain-based validation.
* Version: 0.5.5
* Version: 0.5.7
* Author: Marco Graetsch
* Author URI: https://src.bundespruefstelle.ch/magdev
* License: GPL-2.0-or-later
@@ -28,7 +28,7 @@ if (!defined('ABSPATH')) {
}
// Plugin constants
define('WC_LICENSED_PRODUCT_VERSION', '0.5.5');
define('WC_LICENSED_PRODUCT_VERSION', '0.5.7');
define('WC_LICENSED_PRODUCT_PLUGIN_FILE', __FILE__);
define('WC_LICENSED_PRODUCT_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('WC_LICENSED_PRODUCT_PLUGIN_URL', plugin_dir_url(__FILE__));