Added comprehensive session notes for v1.1.14 including:
- Debug logging implementation strategy
- All 7 logging points in product retrieval
- How to use the debug release
- Expected log output and interpretation
- Next steps after receiving user logs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added error_log statements to help diagnose why products aren't showing:
- Log selection criteria being used
- Log WP_Query arguments
- Log number of posts found by query
- Log each product being added (variable variations and simple)
- Log total products available at end
To enable: Set WP_DEBUG to true in wp-config.php
Then check debug.log or error.log for output
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Removed is_in_stock() requirement to show all purchasable products
- Stock status still displayed on frontend, out-of-stock items disabled
- Added 'relation' => 'AND' to meta_query for proper multiple condition handling
- Should fix "No products available" issue
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed from get_available_variations() to get_children() for more reliable
variation ID retrieval. The previous method returned variation data arrays
which may not have worked correctly in all contexts.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
BREAKING CHANGE: Variable products now supported in composable products.
Changes:
- Modified get_available_products() to detect variable products
- Variable products now expand to show all available variations
- Each variation is checked individually for stock and purchasability
- Simple products continue to work as before
This allows customers to select specific variations (e.g., "T-Shirt - Red - Large")
instead of just seeing "T-Shirt" which wasn't selectable.
Fixes the issue where products weren't showing because all products
in the category/tag were variable products.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Two critical bug fixes after v1.1.9 release:
1. Admin tabs both visible on initial page load
2. Frontend product selector showing no products
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added translation for "No products available for selection" message in all 6 locales:
- de_DE (formal): Keine Produkte zur Auswahl verfügbar. Bitte konfigurieren Sie...
- de_DE_informal: ...Bitte konfiguriere...
- de_CH (formal): ...Bitte konfigurieren Sie...
- de_CH_informal: ...Bitte konfiguriere...
- fr_CH: Aucun produit disponible pour la sélection...
- it_CH: Nessun prodotto disponibile per la selezione...
Recompiled all .mo files.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Bug 1: Admin - Both General and Composable tabs visible on initial load
- Added explicit display:none to #composable_product_data panel
- Panel now hidden by default, shows only when product-type-composable class is present
- Prevents both tabs showing simultaneously on new product creation
Bug 2: Frontend - No feedback when no products configured
- Added empty state message when products array is empty
- Users now see helpful message instead of blank grid
- Cleared Twig cache to ensure template changes take effect
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
CRITICAL FIX: The previous CSS change used .show_if_composable with !important
which hid ALL elements with that class, including the tab links themselves.
Changes:
- Changed from .show_if_composable to .options_group.show_if_composable
- Changed from .product_data_tabs .composable_options to li.composable_options
- Removed !important flags (not needed with specific selectors)
- Now only hides the general tab option groups, not the tab links
This fixes:
- Missing Composable Options tab in product edit screen
- Fields appearing out of context
- Tab navigation completely broken
The issue was that WooCommerce adds 'show_if_composable' class to BOTH:
1. The tab link (li.composable_options.show_if_composable)
2. The general tab fields (div.options_group.show_if_composable)
Now we specifically target only the option groups, leaving tabs alone.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added comprehensive documentation for Session 11 covering three critical UI bug fixes:
1. Admin rendering bug - Fixed CSS specificity for proper tab visibility
2. Frontend product selector not appearing - Added woocommerce_is_purchasable filter
3. Localized price formatting - Implemented full WooCommerce price format support
Documentation includes:
- Detailed root cause analysis for each bug
- Complete code examples showing the fixes
- Links to specific file locations and line numbers
- Key lessons learned about WordPress/WooCommerce integration
- Testing recommendations for verification
Updated "Bugs found" section to mark all three issues as fixed in v1.1.8.
Added note about v1.1.6/v1.1.7 package structure fix (parent directory issue).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixes three critical bugs reported in CLAUDE.md:
1. Admin rendering bug - Fixed CSS to prevent both General and Composable
Options tabs from showing simultaneously on initial page load
- Enhanced CSS specificity with !important flags
- Added body.product-type-composable selectors for proper visibility control
- Hides Composable Options tab by default, shows only when composable type selected
2. Frontend product selector not appearing - Fixed WooCommerce integration
- Added hide_default_add_to_cart() method to Cart_Handler
- Hooks woocommerce_is_purchasable filter to return false for composable products
- This hides WooCommerce's default add-to-cart button
- Allows our custom product selector to be the only interface
3. Localized price formatting - Implemented proper WooCommerce price formatting
- Added wc_price Twig function in Plugin.php
- Updated Product_Selector to pass formatted price HTML to template
- Added price_format data to JavaScript localization
- Implemented formatPrice() method in frontend.js
- Supports all WooCommerce price formats (currency position, decimals, separators)
- Template now uses {{ fixed_price_html|raw }} and {{ zero_price_html|raw }}
- JavaScript dynamically formats prices using locale-specific settings
Technical improvements:
- Cart_Handler.php: +14 lines (hide_default_add_to_cart method)
- Plugin.php: +7 lines (wc_price function, price format localization)
- Product_Selector.php: +2 lines (formatted price HTML context)
- templates/product-selector.twig: Modified to use formatted price HTML
- assets/css/admin.css: +24 lines (enhanced tab visibility control)
- assets/js/frontend.js: +28 lines (formatPrice method with WooCommerce format support)
All PHP files pass lint checks. Frontend now properly displays localized prices
with correct currency symbols, decimal separators, and thousand separators for
all WooCommerce-supported locales (CHF for Switzerland, € for Europe, etc.).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Corrected directory structure to match WordPress plugin standards.
Package now contains wc-composable-product/ parent directory with all files inside.
WordPress will extract to wp-content/plugins/wc-composable-product/ (correct!).
Package size: 410 KB (419,430 bytes)
New SHA-256: fb8f12486f19aef61f6e6ea4af63fe66f64adca66e2d42e1d17e9f05cb82f39f
New MD5: cc8c13780c4e8063c97b8632d0a43adb
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
CRITICAL FIX: WordPress plugin directory structure
Previous issue:
- ZIP contained files at root level
- WordPress created directory based on ZIP name: wc-composable-product-v1.1.7/
- This caused version-numbered directory in wp-content/plugins/
Corrected structure:
- ZIP now contains wc-composable-product/ parent directory
- All plugin files inside wc-composable-product/ directory
- WordPress extracts to wp-content/plugins/wc-composable-product/ (correct!)
Changes:
- Recreated ZIP with proper directory structure using rsync + zip
- Package size: 410 KB (419,697 bytes) - slightly larger due to parent dir
- New SHA-256: 866e7dd34431f4c881629fd8b59ddd3a27c7a45b7324a3d88cd064a3e01c1b83
- New MD5: 871fbb3b910380c0e43bcf1538408eda
WordPress standard: Plugin ZIP must contain single parent directory named after
the plugin slug, with all files inside that directory.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added post-release updates section to v1.1.7 documentation:
- Both v1.1.6 and v1.1.7 release packages now committed to repository
- v1.1.6: 378 KB with .po files only (translations won't work)
- v1.1.7: 393 KB with .po + .mo files (translations functional)
- All packages include SHA-256 and MD5 checksums
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Release package for v1.1.6 including:
- Complete admin translations for Fixed Price field (v1.1.4 feature)
- All 6 locales with 56/56 strings translated (.po files)
- Package size: 378 KB (1,092,772 bytes)
- Files included: 370 files
Checksums:
- SHA-256: d64f4f5f1a00d392989cb613780e5726106a08c6aace08e0c74c80553a0b0f1e
- MD5: eae384e342450abd4ac83af0266ac764
Note: This version includes .po translation files but not compiled .mo files.
Users should upgrade to v1.1.7 for functional translations in WordPress.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added comprehensive documentation for Session 10:
- Critical bug fix: Missing translations due to lack of compiled .mo files
- Root cause analysis: WordPress requires .mo files, not just .po files
- Solution: Compiled all 6 .po files to .mo format using msgfmt
- Release details: v1.1.7 with 393 KB package, 376 files
- Key lessons: .po vs .mo files, WordPress i18n requirements, testing workflow
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Compiled 6 .mo files from .po sources (de_DE, de_DE_informal, de_CH, de_CH_informal, fr_CH, it_CH)
- Required for WordPress to load translations in admin and frontend
- All locales now have 56/56 strings translated and compiled
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added comprehensive session history for v1.1.6 including:
- Translation completion for all 6 locales
- Version bump details
- Release package creation
- Checksums and file counts
- Key lessons learned about translation maintenance
Fixed markdown linting: Added blank line before list
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated all translation files with new strings from v1.1.4:
- Simplified "How to calculate the price" description
- New "Fixed Price" field label
- New "Enter the fixed price for this composable product" description
Translations added to all 6 locales:
- de_DE (German formal): Festpreis / Geben Sie den Festpreis ein
- de_DE_informal (German informal): Festpreis / Gib den Festpreis ein
- de_CH (Swiss German formal): Festpreis / Geben Sie den Festpreis ein
- de_CH_informal (Swiss German informal): Festpreis / Gib den Festpreis ein
- fr_CH (Swiss French): Prix fixe / Entrez le prix fixe
- it_CH (Swiss Italian): Prezzo fisso / Inserisci il prezzo fisso
All admin strings are now fully translated across all supported locales.
Updated CLAUDE.md "Bugs found" section to mark admin translation task as completed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added comprehensive session history for v1.1.5 including:
- Root cause analysis of Twig filter vs function mismatch
- Error log evidence and backtrace analysis
- Technical solution with code examples
- Lessons learned about multi-plugin Twig compatibility
- Updated "Bugs found" section marking Twig bug as fixed
Also fixed markdown linting warnings:
- Added blank line before fenced code block
- Added language specification (text) to code fence
- Added blank line around list
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed "Unknown 'esc_attr' filter" error that occurred when rendering
the product selector template. The issue was caused by WordPress
escaping functions being registered only as Twig functions, not filters.
Changes:
- Added TwigFilter registrations for esc_html, esc_attr, esc_url
- Template now supports both filter syntax (|esc_attr) and function syntax
- Fixes compatibility issues when other plugins use their own Twig instances
- Version bump to 1.1.5
This resolves the bug documented in logs/fatal-errors-2025-12-31.log
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added session history for v1.1.4 which introduced:
- Fixed price field in Composable Options tab
- JavaScript toggle based on pricing mode selection
- Improved admin UX with progressive disclosure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added 8 missing stock management translations to all locales:
- de_DE (German, formal): Stock strings with "auf Lager"
- de_DE_informal (German, informal): Stock strings with "auf Lager"
- de_CH (Swiss German, formal): Stock strings with "an Lager"
- de_CH_informal (Swiss German, informal): Stock strings with "an Lager"
- fr_CH (Swiss French): Stock strings with "en stock/rupture"
All translation files now complete with 55/55 strings:
- "\"%s\" is out of stock and cannot be selected."
- "Only %2$d of \"%1$s\" are available in stock."
- "Stock reduced for \"%1$s\": -%2$d (remaining: %3$d)"
- "Stock restored for \"%1$s\": +%2$d (total: %3$d)"
- "Out of stock"
- "Only"
- "left"
- "In stock"
Note: it_CH already had complete translations from v1.1.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>