=== Advanced Addons for WooCommerce === Contributors: amrelarabi Donate link: https://www.paypal.com/paypalme/amrelarabi Tags: woocommerce, product addons, customization, dynamic pricing, e-commerce Requires at least: 5.8 Tested up to: 7.0 Requires PHP: 7.4 Stable tag: 1.0.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Add advanced addons to WooCommerce products with nested groups, dynamic types, and flexible pricing. == Description == Advanced Addons for WooCommerce lets you add dynamic, customizable addons to WooCommerce products. Support text, color, radio, and image options with nested addon groups and optional pricing. **Features:** * Flexible, nested addon groups on each product. * Addon types: text, image, color, and radio. * Dynamic pricing for selections, with optional tax support. * Global settings under WooCommerce > Settings > Product Addons. * React-based admin UI on the product Addons Manager tab. * Frontend styling customizable via CSS variables. **Requirements:** * WordPress 5.8 or later * WooCommerce (active) * PHP 7.4 or later **Shortcode:** Use `[aafw_product_addons]` on any page, or `[aafw_product_addons product_id="123"]` for a specific product. == Installation == 1. Upload the plugin folder to `/wp-content/plugins/` or install the zip via Plugins > Add New > Upload Plugin. 2. Activate the plugin through the Plugins screen. 3. Ensure WooCommerce is installed and active. 4. Go to WooCommerce > Settings > Product Addons to configure global options. 5. Edit a product and open the **Addons Manager** tab to build addons for that product. == Frequently Asked Questions == = Does this plugin require WooCommerce? = Yes. WooCommerce must be installed and active. If WooCommerce is missing, an admin notice is shown. = How do I enable addons globally? = Go to WooCommerce > Settings > Product Addons and enable **Enable Addons Globally**. = How do I display addons outside the single product template? = Use the shortcode `[aafw_product_addons]` or `[aafw_product_addons product_id="123"]`. = Can I customize the appearance of the addons? = Yes. Override styles in your theme or use the plugin CSS variables in `dist/frontend-styles.min.css`. = Does this plugin support tax on addon prices? = Yes. Enable **Enable Tax for Addons** under WooCommerce > Settings > Product Addons and choose a tax class. == Screenshots == 1. Product Addons global settings in WooCommerce admin. 2. Product page with customer-facing addon selectors. 3. Addons Manager tab on the product edit screen. == Changelog == = 1.0.1 = * Security: Restricted save/load addon AJAX to logged-in users with product edit capability. * Fixed add-to-cart failing on products without required addon selection. * Fixed cart totals repeatedly adding addon price on recalculation. * Fixed selected addon JSON being corrupted during cart submission. * Added WooCommerce dependency check and admin notice when inactive. * Order line items now store addon data via HPOS-compatible APIs. * Tax class setting now uses WooCommerce tax classes dynamically. * Cart separates line items when the same product has different addon selections. * Aligned default expanded/collapsed addon state with global settings. * Added shared helper utilities and asset cache busting. = 1.0.0 = * Initial release. * Dynamic addons (text, image, color, radio) with nested groups. * Dynamic pricing and tax support for addon selections. * Customizable frontend design. == Upgrade Notice == = 1.0.1 = Security and cart pricing fixes. Recommended update for all sites using product addons.