What it does
Advanced Variations, in practice.
Stores one swatch per attribute term in its own ambikly_attribute_swatches table, keyed on attribute slug and term slug, with a type of color, image or text and a value. GET /ambikly-pro/v1/variation-swatches returns the whole map publicly; POST upserts a row atomically and is limited to the manage-store capability. On product pages the script fetches the map once, and for each attribute select that has at least one configured swatch it builds a row of buttons: color chips, image tiles or text, with optional labels. The original select stays in the DOM, visually hidden, and receives the value and a change event, so the core variation logic keeps working unchanged.