=== OptionBay - Product Options and Addons ===
Contributors: wpanchorbay, sankarsan, forhadkhan, arifac, shuvendushekhar
Tags: woocommerce, product options, product addons, extra product options, conditional logic
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 8.7
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add WooCommerce product options, add-ons, swatches, conditional fields, pricing, and shared inventory to product pages.

== Description ==

OptionBay helps WooCommerce store owners add custom product options and paid add-ons without creating complex variation sets.

Use it for gift wrap, meal builders, swatches, booking choices, custom notes, service add-ons, and product configuration flows. Customers choose options on the product page. OptionBay then carries those choices into the cart, checkout, and order details.

Smart Product Options and Addons gives your store a practical option builder inside the WordPress dashboard. You can create option groups, add fields, set pricing, control visibility, and manage shared add-on inventory from one place.

[youtube https://www.youtube.com/watch?v=3r1VoKZvCl4]


[Product Page](https://wpanchorbay.com/plugins/smart-product-options-addons/) | [Official Documentation](https://docs.wpanchorbay.com/smart-product-options-addons/) | [Support](https://wpanchorbay.com/support/) | [Live Demo](https://spoa.wpanchorbay.com/?auto-login=true)

= Key Features =

* Create WooCommerce product option groups from Products > Options.
* Add text, textarea, select, checkbox, single checkbox, radio, number, email, color swatch, image swatch, and static content fields.
* Charge flat fees or percentage-based prices for fields and selectable choices.
* Show or hide fields with conditional logic.
* Use shared inventory pools for add-on stock.
* Support option stock reduction by item quantity or by line item.
* Add option weight to WooCommerce cart items for better shipping totals.
* Display selected options in the cart, checkout, and order line items.
* Import and export option groups, inventory data, and plugin settings.
* Start faster with six draft option group templates.
* Use WooCommerce High-Performance Order Storage with declared HPOS compatibility.

= Built for Common Store Needs =

OptionBay is useful when a product needs more than a standard size or color selector.

You can build product add-ons for:

* Gift wrapping and greeting cards.
* Food ordering and pizza builders.
* Laptop and device configuration.
* Custom apparel choices.
* Floral arrangement options.
* Auto detailing and service booking choices.

= Starter Templates =

Includes six draft starter templates:

1. Gift Wrapping Service
2. Laptop Configurator
3. Gourmet Pizza Builder
4. Custom Apparel
5. Floral Arrangement Options
6. Auto Detailing Booking

These templates are created as drafts. Review each template before publishing it on your store.

== Installation ==

1. Make sure WooCommerce is installed and active.
2. Upload the plugin folder to `/wp-content/plugins/optionbay-product-options-addons-woo/`.
3. You can also install the plugin through Plugins > Add New in WordPress.
4. Activate OptionBay from the Plugins screen.
5. Go to Products > Options to create your first option group.
6. Publish the option group and assign it globally or to a product.
7. Open a product page and test the customer flow.

== Frequently Asked Questions ==

= Does OptionBay require WooCommerce? =

Yes. OptionBay requires WooCommerce. It works with WooCommerce products, cart items, checkout, order line items, and product settings.

= Where do I manage product options? =

Go to Products > Options in your WordPress dashboard. You can also find settings under WooCommerce > Settings > Products > Options.

= Can I use OptionBay instead of WooCommerce variations? =

Yes, for many product option workflows. OptionBay can reduce the need for large variation sets.

Use WooCommerce variations when each choice needs its own SKU, image, stock record, or native variation behavior.

= What field types are included? =

This free version includes text, textarea, select, checkbox, single checkbox, radio, number, email, color swatch, image swatch, and static content fields.

= Can I charge extra for selected options? =

Yes. You can add flat fees or percentage-based prices to fields and selectable choices.

= Does OptionBay support conditional logic? =

Yes. You can show or hide fields based on customer selections.

= Can I manage stock for add-ons? =

Yes. OptionBay includes shared inventory pools for add-on stock. This is useful when the same add-on is offered across more than one product.

= Will selected options appear in the cart and order? =

Yes. OptionBay displays selected options in the cart and checkout. It also saves them to WooCommerce order line items.

= Does OptionBay support WooCommerce HPOS? =

Yes. The plugin declares compatibility with WooCommerce High-Performance Order Storage.

= Are the starter templates published automatically? =

No. Starter templates are created as drafts. You can review, edit, and publish the templates you want to use.

== Screenshots ==

1. Option group list under Products > Options.
2. Option builder with field settings and conditional logic.
3. Product page with custom options and add-on pricing.
4. Color swatches and image swatches on a product page.
5. Shared inventory management for add-on stock.
6. Cart, checkout, and order details with selected options.
7. Show shared inventory pools or linked stock controls if the plugin has a dedicated screen or modal.
8. Show the order line item with selected OptionBay options saved.

== Changelog ==

= 1.0.3 =
* Added: URL, Tel, Separator and Heading field types.
* Fixed: Reactivating the plugin no longer resets your saved settings or creates another set of the six draft demo option groups.
* Fixed: Uninstall with "delete all data" enabled now also removes the activation-time and deactivation-feedback options and the review-notice dismissal user meta.
* Fixed: An empty stock-tracked field no longer blocks add-to-cart when its stock pool has none left.
* Fixed: Inventory stock is now given back when an order is cancelled or set to pending, and on refunds, including partial refunds with "Restock refunded items".
* Fixed: A checkbox value submitted twice is now counted and priced once.
* Fixed: Values sent for Separator and Heading fields are ignored by the cart.
* Fixed: The live price preview handles negative option prices and never shows a total below zero.
* Fixed: Various internal correctness fixes.

= 1.0.2 =
* Fixed: Option groups assigned by product category or tag now correctly display and validate.
* Fixed: "Exclude" assignment rules are now persisted and applied.
* Fixed: Conditional logic now cascades server-side — a hidden trigger field can no longer be used to unlock a dependent field.
* Fixed: Import now sanitizes group schema and settings against the same allow-list as the admin UI.
* Security: Export/Import REST endpoints now verify the request nonce.
* Added: Pricing strategies and price types are now extensible (enables Pro dynamic pricing); Pro-only field types and pricing show as locked upgrade prompts when the Pro add-on is inactive.
* Fixed: Inventory "Backorders" status in the View Inventory modal now reflects actual stored data (previously always showed "Allowed").
* Fixed: Toggling backorders in the inventory list now applies on the first click instead of silently no-op'ing.
* Fixed: A linked inventory pool now displays correctly when reopening a field, regardless of how it was originally linked.
* Fixed: Updating an inventory item with no changes returns the current item instead of a server error.
* Fixed: Builder validation no longer requires a numeric price amount for pricing strategies that don't use one (e.g. Pro's formula-based pricing).
* Fixed: Various internal correctness and hardening fixes.

= 1.0.1 =
* UI improvements.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.3 =
No action needed. Fixes add-to-cart being blocked by empty stock-tracked fields and restores inventory on cancelled and refunded orders. Orders cancelled before updating are not corrected retroactively, so check your stock pool counts under Options > Inventory. Demo option groups duplicated by earlier activations are not removed automatically; delete any extra copies from Option Groups if you do not need them.

= 1.0.2 =
Fixes category/tag and exclusion assignment rules, hardens conditional logic and import, and adds extensible pricing.

= 1.0.1 =
UI improvements.

= 1.0.0 =
Initial release. Welcome to OptionBay!