=== Imaginate Variation Display Options for WooCommerce ===
Contributors: ImagiSol, Dhruvin
Tags: woocommerce, variations
Requires at least: 4.4
Tested up to: 7.1
Stable tag: 2.5.0
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Replace WooCommerce variation dropdowns with radio buttons and configurable variation display options.

== Description ==

Imaginate Variation Display Options for WooCommerce helps store owners improve the variable product selection experience by replacing the default WooCommerce variation dropdown with clean radio button options.

The plugin is useful for stores that sell products with sizes, colors, packs, subscriptions, or other product attributes where customers should see available variations clearly before adding an item to the cart.

Instead of relying only on dropdown fields, this plugin can display WooCommerce product variations as selectable radio buttons, show variation details, and keep WooCommerce variation behavior working with the product add-to-cart form.

= Key Features =

* Replace WooCommerce variation dropdowns with radio buttons.
* Display product variation options in a clear, customer-friendly layout.
* Merge variation attributes into one variation selector or keep attributes separated.
* Show variation price and description in the variation option template.
* Keep original WooCommerce dropdowns for selected products or attributes when needed.
* Optional setting to replace the add-to-cart form on archive pages.
* Optional JavaScript events for `show_variation` and `found_variation` compatibility.
* Customizable frontend templates for variation display output.
* Optional extra CSS field for small styling adjustments.
* Compatible with WooCommerce High-Performance Order Storage (HPOS).

= Why Use Radio Buttons for WooCommerce Variations? =

WooCommerce variable products often use dropdown menus by default. Dropdowns work well for compact forms, but they can hide available product options from shoppers.

Radio buttons make product variation choices visible immediately. This can help customers compare options faster, reduce missed selections, and create a smoother product page experience for stores with a manageable number of variations.

= Template Customization =

The plugin includes settings for customizing variation display templates. You can adjust the header, each variation row, footer, reset button, labels, and option layout from the WooCommerce settings area.

Frontend template output is filtered through an allowed HTML list so common formatting tags and attributes can be used while keeping the output controlled.

= WooCommerce Requirement =

This plugin requires WooCommerce. It is designed specifically for WooCommerce variable products and product variation forms.

== Installation ==

1. Upload the `imaginate-variation-display-options-woocommerce` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress Plugins screen.
2. Activate the plugin from the Plugins screen in WordPress.
3. Go to WooCommerce > Settings > Imaginate Variation Display Options.
4. Enable the plugin and choose whether variation attributes should be merged or displayed separately.
5. Review the Templates settings if you want to customize the frontend variation output.

== Frequently Asked Questions ==

= Does this plugin work with all WooCommerce products? =

The plugin is built for WooCommerce variable products. Simple products do not use variation dropdowns, so there is nothing to replace on those products.

= Can I keep the original WooCommerce dropdown for some products? =

Yes. The plugin includes product-level and attribute-level options that allow you to use the original dropdown instead of radio buttons where needed.

= Can I customize the radio button output? =

Yes. The plugin includes template settings for the variation display layout. Store owners can customize the output using supported HTML tags and placeholders.

= Does this plugin support WooCommerce HPOS? =

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

= Will this plugin change my product variations? =

No. The plugin changes how variation choices are displayed on the frontend. It does not create, delete, or modify WooCommerce product variations.

= Can I add custom CSS? =

Yes. The plugin includes an optional Extra CSS setting for small style adjustments. CSS entered there is sanitized before it is printed as inline CSS.

== Installation ==

1. Upload the entire folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the "Plugins" menu in WordPress.
3. Start by visiting plugin settings at "WooCommerce > Settings > Imaginate Variation Display Options".

== Changelog ==

= 2.5.0 = 02/08/2026 =
* Compatibility with PHP 8.2
* Compatibility with WooCommerce 10.x
* WooCommerce HPOS compatibility added
* Compatibility with WordPress 7

= 2.4.0 - 30/06/2021 =
* Add compatibility for WooCommerce Quick View Pro by Barn2.
* Dev - Code refactoring for WPCS compliance.
* WC tested up to: 5.4
* Tested up to: 5.7

= 2.3.3 - 07/07/2020 =
* Fix - Fatal error was coming while adding variations.
* WC tested up to: 4.2.
* Tested up to: 5.4.

= 2.3.2 - 18/02/2020 =
* Fix - Now listing only "Used for variations" attributes in hidden inputs on frontend (when "Merge attributes" enabled) and in "Original dropdown (attributes)" select box on backend (when "Merge attributes" disabled).
* Dev - Code refactoring.
* WC tested up to: 3.9.

= 2.3.1 - 14/01/2020 =
* Dev - Additional safe-checks added (when "Merge attributes" option enabled).

= 2.3.0 - 03/01/2020 =
* Dev - "Original dropdown (attributes)" option added to each product's admin edit page (visible only when "Merge attributes" option is disabled).
* Dev - Templates - Options added for non-merged display (i.e. when "General > Merge attributes" is disabled).
* Dev - Admin settings restyled; descriptions updated.
* Dev - Code refactoring.
* WC tested up to: 3.8.
* Tested up to: 5.3.

= 2.2.0 - 01/08/2019 =
* Dev - General - "Merge attributes" option added.
* Dev - Settings - "Extra CSS" settings subsection moved to "General" section.

= 2.1.0 - 21/06/2019 =
* Dev - Advanced - 'Trigger JavaScript "found variation" event' option added (defaults to `no`) (fixes the issue with variation image update with "Porto" theme).
* Dev - General Options - Override main price - "Override with lowest variation price" option added.
* Dev - Templates - "Extra CSS" option added.

= 2.0.0 - 08/05/2019 =
* Dev - "Templates" settings section added.
* Dev - JS - `imaginate-variation-display-options-woocommerce-frontend.js` - Triggering `show_variation` event (e.g. it fixes the issue with "Quantity based pricing table" in "Woocommerce All Discounts" plugin). "Trigger JavaScript 'show variation' event" option added to "General" settings section.
* Tested up to: 5.2

= 1.3.0 - 07/05/2019 =
* Dev - Advanced - "Replace 'add to cart' form on archives" option added.
* Dev - JS - `imaginate-variation-display-options-woocommerce-frontend.js` - Major code refactoring (will allow script to function on archives now).
* Dev - JS - `imaginate-variation-display-options-woocommerce-frontend.js` - Clear button is now displayed on initial load.

= 1.2.6 - 01/05/2019 =
* Dev - `alg_radio_input_td_default` and `alg_label_td_default` HTML classes added to the default variation.

= 1.2.5 - 29/04/2019 =
* Dev - Advanced - "Load plugin's JavaScript on single product pages only" option added.

= 1.2.4 - 19/04/2019 =
* Dev - General Options - "Override main price" option added.
* Dev - Code refactoring - JS - `imaginate_variation_display_options_woocommerce_` prefix added to all functions.

= 1.2.3 - 18/04/2019 =
* Dev - Compatibility with "WooCommerce WP Social Deals" plugin added.
* Dev - Admin settings descriptions updated.

= 1.2.2 - 14/03/2019 =
* Fix - Variations descriptions are now hidden on "no default variation" option.

= 1.2.1 - 13/03/2019 =
* Fix - Variations descriptions are now properly displayed on switch.
* Dev - Admin settings restyled.
* Dev - Code refactoring.
* Dev - Translation (POT) file added.

= 1.2.0 - 18/01/2019 =
* Fix - Properly formatting "WooCommerce Subscriptions" prices now (includes sign-up fee etc.).
* Dev - Code refactoring and clean up.
* Dev - Admin settings restyled.
* Dev - "Raw values" are now allowed in admin "style" settings.
* Dev - Plugin URI updated.

= 1.1.4 - 01/11/2018 =
* Add WooCommerce Subscriptions compatibility.

= 1.1.3 - 18/10/2018 =
* Add option to remove price.

= 1.1.2 - 11/10/2018 =
* Add clear button.
* Add variation label.
* Remove empty values from variations array.

= 1.1.1 - 01/10/2018 =
* Check if is variable product before adding JavaScript.
* Update WC tested up to.
* Fix variation.php template.

= 1.1.0 - 20/03/2018 =
* "WC tested up to" added to plugin header.
* Add a metabox on products, with an option to override the radio button by the default dropdown.

= 1.0.0 - 05/08/2017 =
* Initial Release.

== Upgrade Notice ==

= 1.0.0 =
This is the first release of the plugin.
