Added complete inventory tracking system for composable products:
- Stock validation during product selection and add-to-cart
- Automatic stock deduction on order completion/processing
- Automatic stock restoration on order cancellation/refund
- Stock status indicators with visual feedback (In stock, Low stock, Out of stock)
- Prevention of out-of-stock item selection
- Low stock warnings when 5 or fewer items remain
- Order notes documenting all stock changes
New files:
- includes/Stock_Manager.php: Core stock management logic
Modified files:
- includes/Cart_Handler.php: Integrated stock validation
- includes/Product_Selector.php: Added stock info to product data
- includes/Plugin.php: Added Stock_Manager to includes
- templates/product-selector.twig: Stock status display
- assets/css/frontend.css: Stock indicator styling
- languages/*.pot/*.po: 8 new translatable strings
Version bumped to 1.1.0 with updated CHANGELOG.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed critical bug preventing plugin activation and improved initialization sequence.
Bug Fix:
- Fixed fatal error: "Class 'WC_Settings_Page' not found" in Settings.php:15
- Root cause: Plugin initialized on 'plugins_loaded' before WooCommerce classes loaded
- Changed initialization hook from 'plugins_loaded' to 'woocommerce_loaded'
- Settings class now extends WC_Settings_Page without errors
Settings Integration:
- Settings page properly integrates as "Composable Products" tab in WooCommerce > Settings
- Tab appears after WooCommerce core tabs (Products, Shipping, etc.)
- All settings fields render correctly:
- Default Selection Limit (number input)
- Default Pricing Mode (select dropdown)
- Display options (checkboxes for images, prices, total)
Technical Details:
- Using woocommerce_loaded hook ensures WC_Settings_Page class is available
- Prevents race condition during plugin initialization
- Settings class registration via woocommerce_get_settings_pages filter works correctly
- No breaking changes to existing functionality
Version bumped to 1.0.1 with updated CHANGELOG.md documenting the fix.
Tested: Plugin now activates without errors and settings tab appears correctly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Created translation (.po) files for all 6 planned locales:
German locales:
- de_DE: German (Germany, formal "Sie")
- de_DE_informal: German (Germany, informal "du")
- de_CH: German (Switzerland, formal "Sie")
- de_CH_informal: German (Switzerland, informal "du")
Swiss locales:
- fr_CH: French (Switzerland)
- it_CH: Italian (Switzerland)
All translations include:
- Complete translation of all 40+ user-facing strings
- Proper plural forms configuration
- Swiss locale examples using CHF currency formatting
- Formal/informal variants where appropriate
- Locale-specific terminology (e.g., "Artikelnummer" vs "référence")
Translation coverage:
✓ Plugin activation messages
✓ Admin settings interface
✓ Product data tab fields
✓ Frontend product selector
✓ Cart and checkout messages
✓ Error and validation messages
Ready for compilation to .mo files for production use.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Enhanced CLAUDE.md with comprehensive project context for future AI sessions:
Added sections:
- Complete project structure with file descriptions
- Architecture overview with all 6 core classes
- Detailed data flow diagrams for product creation, display, and cart
- Development workflow and testing checklist
- Release creation commands
- Session history documenting v1.0.0 implementation
Key updates:
- Documented all architectural decisions made during implementation
- Added testing checklist for quality assurance
- Included known limitations and future enhancement ideas
- Created "For AI Assistants" section with session startup guide
- Updated translation section to reflect current .pot template status
This documentation will help future sessions understand:
- What was built and why
- How the system works end-to-end
- What needs testing before releases
- Areas for future improvement
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implemented custom WooCommerce product type allowing customers to build their own
product bundles by selecting from predefined sets of products.
Features:
- Custom "Composable Product" type with admin interface
- Product selection by category, tag, or SKU
- Configurable selection limits (global and per-product)
- Dual pricing modes: fixed price or sum of selected products
- Modern responsive frontend with Twig templates
- AJAX add-to-cart functionality
- Full internationalization support (.pot file)
- WooCommerce settings integration
- Comprehensive documentation
Technical implementation:
- PHP 8.3+ with PSR-4 autoloading
- Twig 3.0 templating engine via Composer
- Vanilla JavaScript with jQuery for frontend interactions
- WordPress and WooCommerce hooks for seamless integration
- Security: input sanitization, validation, and output escaping
- Translation-ready with text domain 'wc-composable-product'
Documentation:
- README.md: Project overview and features
- INSTALL.md: Installation and usage guide
- IMPLEMENTATION.md: Technical architecture
- CHANGELOG.md: Version history
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>