a581ef42e61034dea3344dc31e4852aa3591f9bd
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>
WooCommerce Composable Products
Create composable products where customers can select a limited number of items from a configurable set of products.
Description
This plugin adds a new product type to WooCommerce that allows customers to build their own product bundles by selecting from a predefined set of simple or variable products. Think of it as a "build your own gift box" or "create your sticker pack" feature.
Key Features
- Custom Product Type: New "Composable Product" type in WooCommerce
- Flexible Selection: Define available products by category, tag, or SKU
- Configurable Limits: Set global or per-product selection limits
- Pricing Options: Fixed price or sum of selected products
- Multi-language Support: Fully translatable with i18n support
- Modern UI: Clean interface built with Twig templates and vanilla JavaScript
Requirements
- PHP 8.3 or higher
- WordPress 6.0 or higher
- WooCommerce 8.0 or higher
Installation
- Upload the plugin files to
/wp-content/plugins/wc-composable-product/ - Run
composer install --no-devin the plugin directory - Activate the plugin through the 'Plugins' menu in WordPress
- Configure global settings under WooCommerce > Settings > Composable Products
Usage
Creating a Composable Product
- Go to Products > Add New
- Select "Composable Product" as the product type
- Configure product details:
- Set the selection limit (or use global default)
- Choose pricing mode (fixed or sum)
- Define available products by category, tag, or SKU
- Publish the product
Global Settings
Navigate to WooCommerce > Settings > Composable Products to configure:
- Default selection limit
- Default pricing mode
- Display options
Development
This project was created with AI assistance (Claude.AI) and follows WordPress and WooCommerce best practices.
Building from Source
composer install
Translation
Generate POT file:
wp i18n make-pot . languages/wc-composable-product.pot
License
GPL v3 or later - see LICENSE file for details
Author
Marco Graetsch
Support
For issues and feature requests, please use the GitHub issue tracker.
Description
Languages
PHP
72%
JavaScript
14.2%
CSS
8.1%
Twig
5.7%