From f8f643434295877acb929fa7d98ed874d9fb5399 Mon Sep 17 00:00:00 2001 From: magdev Date: Tue, 27 Jan 2026 17:48:36 +0100 Subject: [PATCH] Update CLAUDE.md with v0.5.14 and v0.5.15 session history Co-Authored-By: Claude Opus 4.5 --- CLAUDE.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index f3bfa7b..3a202bb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1600,3 +1600,59 @@ Fixed licenses not showing in admin order form for licensed-variable products an - Created release package: `releases/wc-licensed-product-0.5.13.zip` (1.0 MB) - SHA256: `814710ad899529d0015494e4b332eace7d8e55aeda381fdf61f99274c0bf910c` - Committed to `dev` branch + +### 2026-01-27 - Version 0.5.14 - Product Versions Meta Box Fix + +**Overview:** + +Fixed Product Versions meta box not appearing for licensed-variable products in admin. + +**Bug Fixes:** + +- Product Versions meta box now always added to product pages, visibility controlled via CSS/JavaScript +- Added `Installer::registerProductTypes()` to create product type terms in the `product_type` taxonomy +- Product type terms are now ensured to exist on `woocommerce_init` hook for existing installations + +**Modified files:** + +- `src/Admin/VersionAdminController.php` - Simplified `addVersionsMetaBox()` to always add meta box +- `src/Installer.php` - Added `registerProductTypes()` method +- `src/Product/LicensedProductType.php` - Added `ensureProductTypeTermsExist()` hook + +**Technical notes:** + +- WooCommerce's `WC_Product_Factory::get_product_type()` requires product type terms to exist in the `product_type` taxonomy +- Meta box visibility is controlled via JavaScript based on selected product type +- Taxonomy terms are registered on `woocommerce_init` hook to ensure WooCommerce is fully loaded + +### 2026-01-27 - Version 0.5.15 - Tab Rendering Fix + +**Overview:** + +Fixed tab rendering bug in WooCommerce product edit page when switching to licensed or licensed-variable product types. + +**Bug Fixes:** + +- Fixed tab rendering issue where License Settings and Variations tabs appeared shifted/overlapping +- Simplified JavaScript to avoid conflicts with WooCommerce's native show/hide logic +- Removed conflicting CSS rule for `.hide_if_licensed` that was causing layout issues +- License Settings tab now uses CSS class toggle (`.wclp-active`) instead of jQuery `.show()/.hide()` +- Variations tab properly shows for licensed-variable products via `woocommerce_product_data_tabs` filter + +**Modified files:** + +- `src/Product/LicensedProductType.php` - Simplified `toggleOurElements()` JavaScript function, added `show_if_licensed-variable` class to variations tab +- `assets/css/admin.css` - Removed `.hide_if_licensed` rule, updated tab visibility CSS to target `li.licensed_product_options` + +**Technical notes:** + +- jQuery's `.show()` sets `display: block` which can break `
  • ` element layouts in tab lists +- Using CSS class toggle (`addClass/removeClass`) preserves proper display values +- WooCommerce product data tabs use class pattern `{tab_key}_options` (e.g., `licensed_product_options`) +- The `woocommerce_product_data_tabs` filter allows adding classes to existing tabs like variations + +**Release v0.5.15:** + +- Created release package: `releases/wc-licensed-product-0.5.15.zip` (862 KB) +- SHA256: `47407de49bae4c649644af64e87b44b32fb30eeb2d50890ff8c4bbb741059278` +- Committed to `dev` branch