Implement version 0.0.8 features

- Remove Current Version field from product license settings
- Derive current version from latest product version in database
- Refactor email system to use WooCommerce email notification classes
- Add LicenseExpirationEmail WC_Email class for expiration warnings
- Add customizable email templates (HTML and plain text)
- Update settings to link to WooCommerce email configuration
- Update translations for new email-related strings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-21 20:55:28 +01:00
parent 50388c2019
commit c6726703e4
13 changed files with 713 additions and 206 deletions

View File

@@ -36,10 +36,6 @@ This project is proudly **"vibe-coded"** using Claude.AI - the entire codebase w
_No known bugs at this time._
### Version 0.0.8 (Next)
_No planned features yet. Add items as needed._
## Technical Stack
- **Language:** PHP 8.3.x
@@ -429,3 +425,38 @@ Full API documentation available in `openapi.json` (OpenAPI 3.1 specification).
- Expiration warnings use WordPress cron with daily schedule
- CSV import supports both exported format and simplified format
- User meta tracks expiration notifications to prevent duplicates
### 2026-01-21 - Version 0.0.8 Features
**Implemented:**
- Removed "Current Version" field from product license settings
- Current version now automatically derived from latest product version in database
- Refactored email system to use WooCommerce email notification classes
- License Expiration Warning email is now configurable via WooCommerce > Settings > Emails
- Email templates can be overridden in themes (woocommerce/emails/license-expiration.php)
- Configurable warning days for expiration notifications (first and second warning)
**New classes:**
- `LicenseExpirationEmail` - WooCommerce WC_Email subclass for license expiration warnings
**New files:**
- `templates/emails/license-expiration.php` - HTML email template
- `templates/emails/plain/license-expiration.php` - Plain text email template
**Modified classes:**
- `LicensedProduct` - `get_current_version()` and `get_major_version()` now query VersionManager
- `LicensedProductType` - Removed Current Version field from product data panel
- `VersionAdminController` - Removed automatic update of `_licensed_current_version` meta
- `LicenseEmailController` - Registers WooCommerce email class, uses WC email system for sending
- `SettingsController` - Updated email section to link to WooCommerce email settings
**Technical notes:**
- WooCommerce email system allows admins to customize subject, heading, content, and enable/disable
- Email templates follow WooCommerce conventions and can be overridden in themes
- Expiration warning schedule (days before) remains in plugin settings
- Email enable/disable is controlled through WooCommerce email settings