Implement version 0.0.11 features

- Add Created date column to admin license overview
- Add License Statistics page under WooCommerce menu
- Add REST API endpoints for analytics data with time-series support
- WooCommerce Analytics integration via submenu page

New files:
- src/Admin/AnalyticsController.php
- templates/admin/statistics.html.twig

REST API endpoints:
- GET /wc-licensed-product/v1/analytics/stats
- GET /wc-licensed-product/v1/analytics/products

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-21 23:50:57 +01:00
parent ff9b27e811
commit 45531f86d6
11 changed files with 864 additions and 11 deletions

View File

@@ -36,10 +36,6 @@ This project is proudly **"vibe-coded"** using Claude.AI - the entire codebase w
- Version uploads not appearing in list (under investigation - may require plugin reactivation to ensure database tables exist)
### Version 0.0.11 (planned)
- TBD - no specific features planned yet
## Technical Stack
- **Language:** PHP 8.3.x
@@ -597,3 +593,36 @@ Full API documentation available in `openapi.json` (OpenAPI 3.1 specification).
- Created release package: `releases/wc-licensed-product-0.0.10.zip` (472 KB)
- SHA256: `3f4a093f6d4d02389082c3a88c00542f477ab3ad4d4a0c65079e524ef0739620`
- Tagged as `v0.0.10` and pushed to `main` branch
### 2026-01-21 - Version 0.0.11 Features
**Implemented:**
- Created date column added to admin license overview
- License Statistics page under WooCommerce menu (WooCommerce > License Statistics)
- REST API endpoints for analytics data with time-series support
- WooCommerce Analytics integration via submenu page
**New files:**
- `src/Admin/AnalyticsController.php` - WooCommerce Analytics integration
- `templates/admin/statistics.html.twig` - Statistics page template
**New REST API endpoints:**
- `GET /wp-json/wc-licensed-product/v1/analytics/stats` - License statistics with time-series data (supports day/week/month/quarter/year intervals)
- `GET /wp-json/wc-licensed-product/v1/analytics/products` - License counts by product
**Modified files:**
- `templates/admin/licenses.html.twig` - Added "Created" column
- `src/Admin/AdminController.php` - Added "Created" column to fallback rendering
- `src/Plugin.php` - Added AnalyticsController initialization and `getInstance()` alias
**Technical notes:**
- Statistics page accessible via WooCommerce > License Statistics submenu
- REST API endpoints support date range filtering (`after`, `before` parameters)
- Time-series data aggregation supports multiple intervals (day, week, month, quarter, year)
- AnalyticsController registers REST routes and renders statistics page
- Page uses existing dashboard CSS styles for consistent appearance