wc-product-attribute-swatches
Installation
SKILL.md
WooCommerce product attribute swatches
Use this skill when a plugin or theme needs to read, write, render, or audit WooCommerce visual product attributes. In WooCommerce 11.0 this is not a mature "classic variation swatches" template API. It is an experimental wc-visual product attribute type with color/image term metadata, consumed by selected block UI and optionally exposed by Store API.
Source-verified status in 11.0.0
- Feature ID:
wc-visual-attribute. - Feature option:
woocommerce_feature_wc_visual_attribute_enabled. - Default: experimental and disabled by default.
- Admin UI gating: the feature setting UI is disabled on non-block themes;
wc_get_attribute_types()only exposeswc-visualwhen the site is a block theme with the feature enabled, or when the store already has an existingwc-visualattribute. - Attribute type slug:
wc-visual. - Admin label:
Color / image. - Visual term value types:
color,image,none. - Supported core term meta:
colorhex string andimageattachment ID. Image wins over color when both exist; core save logic deletes the other key. - Classic single-product variable template still renders
wc_dropdown_variation_attribute_options()selects. It does not output swatch buttons by itself. - Store API visual data is opt-in and experimental: request
__experimental_visual=true; response property is__experimentalVisual.