You've already forked wc-composable-product
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>
2.7 KiB
2.7 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.1.0] - 2024-12-31
Added
- Stock Management Integration: Complete inventory tracking system for composable products
- Stock validation during product selection and add-to-cart
- Automatic stock deduction when orders are completed/processed
- Automatic stock restoration on order cancellation/refund
- Stock status indicators in product selector (In stock, Low stock, Out of stock)
- Visual feedback for out-of-stock items (disabled checkboxes, reduced opacity)
- Low stock warnings when 5 or fewer items remain
- Prevention of out-of-stock item selection
- Order notes documenting stock changes
Technical
- New
Stock_Managerclass handling all stock operations - Integration with WooCommerce order status hooks
- Stock information passed to frontend via Twig template
- Enhanced CSS styling for stock status badges
- Stock data stored in order item meta for accurate tracking
- Backorder support detection and handling
Translation
- Added 8 new translatable strings for stock messages
- Updated Italian (Switzerland) translation with stock-related terms
- Updated translation template (.pot file)
[1.0.1] - 2024-12-31
Fixed
- Fatal error "Class WC_Settings_Page not found" during plugin activation
- Changed initialization hook from
plugins_loadedtowoocommerce_loadedto ensure WooCommerce classes are available before plugin initialization - Settings page now correctly integrates as a tab in WooCommerce > Settings
Technical
- Plugin now waits for
woocommerce_loadedaction before initializing - Prevents race condition where WooCommerce classes weren't loaded yet
- Settings tab appears correctly in WooCommerce settings interface
1.0.0 - 2024-12-31
Added
- Initial release
- Composable product type for WooCommerce
- Product selection by category, tag, or SKU
- Configurable selection limits (global and per-product)
- Two pricing modes: fixed price or sum of selected products
- Admin settings page
- Frontend product selector with grid layout
- AJAX add-to-cart functionality
- Twig template engine integration
- Full internationalization support
- Responsive design
- WooCommerce cart integration
- Product data validation
Features
- Select products from predefined categories, tags, or SKUs
- Limit number of items customers can select
- Visual product selector with images and prices
- Real-time price calculation
- Clean, modern UI
- Mobile responsive
- Translation ready