=== RIACO Size Guide for WooCommerce ===
Contributors: prototipo88
Tags: woocommerce, size guide, product tab, popup, table builder
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add size guides to WooCommerce products via a visual table builder with tab, popup, or inline display.

== Description ==

**RIACO Size Guide for WooCommerce** lets store owners create size guide templates with a visual table builder, assign them to product categories or individual products, and display them on product pages.

= Key Features =

* **Visual table builder** — add, remove, and reorder rows and columns directly in the editor, no coding required.
* **Featured image support** — attach a size guide image and choose whether it appears above the table, below the table, or instead of it.
* **Flexible display modes** — show the guide as a product tab, a popup/modal triggered by a button, or inline above or below the add-to-cart button.
* **Category assignment** — assign a guide to one or more product categories from the guide edit screen; products inherit the guide automatically.
* **Per-product override** — override or disable the guide on any individual product from the WooCommerce product data panel.
* **Accessible modal** — the popup modal is keyboard-navigable and uses proper ARIA roles.
* **Developer hooks** — four filters let developers override guide resolution, display type, HTML output, and tab arguments.
* **HPOS compatible** — declared compatible with WooCommerce High-Performance Order Storage.

= Developer Filters =

* `riaco_sgfw_chart_for_product` — swap or suppress the resolved guide for any product.
* `riaco_sgfw_display_type_for_product` — override the display type per product.
* `riaco_sgfw_chart_html` — modify the full guide HTML before output.
* `riaco_sgfw_tab_args` — change tab label, priority, or callback.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install via **Plugins → Add New**.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Make sure WooCommerce is installed and active.
4. Go to **WooCommerce → Size Guides** to create your first size guide.
5. Assign the guide to product categories from the guide edit screen, or override it per product in the **Size Guide** tab of the product data panel.
6. Configure the global display type under **WooCommerce → Settings → Size Guides**.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and active.

= Who can create and manage size guides? =

Only users with the `manage_woocommerce` capability — administrators and shop managers by default. Other roles cannot create, edit, or assign size guides.

= Can I show a size guide image instead of a table? =

Yes. Set a featured image on the guide and choose "Image only" from the Image Position meta box on the guide edit screen.

= Can I disable the guide for a specific product? =

Yes. Open the product, go to the **Size Guide** tab in the product data panel, and select **Disable (no guide)**.

= Where do I configure the display type (tab, popup, inline)? =

Go to **WooCommerce → Settings → Size Guides**.

= Why is the guide missing on out-of-stock products? =

The inline display types and the "Above/Below add-to-cart button" popup button positions are attached to the add-to-cart form. When a product cannot be purchased (for example, it is out of stock), WooCommerce does not render that form, so the guide or button is not shown there. If the guide must always be visible, use the **Product Tab** display type or the **After product summary** popup button position.

= Does it work with WooCommerce High-Performance Order Storage (HPOS)? =

Yes, the plugin declares HPOS compatibility.

== Screenshots ==

1. Visual table builder on the guide edit screen.
2. Category assignment meta box on the guide edit screen.
3. Size guide displayed as a product tab.
4. Size guide displayed as a popup modal.
5. WooCommerce Settings > Size Guides tab.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
