| 开发者 | modinatheme |
|---|---|
| 更新时间 | 2026年9月30日 18:15 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
woocommerce_ajax_variation_threshold — 30 variations by default. After that, plugins that lean on that data cannot tell which combinations are out of stock, or which were never built. Every swatch looks available.
The usual advice is to raise the threshold. That pushes your entire variation table into the page and makes it slower for everyone.
SwatchKit does the opposite. When you save a product it builds a compact availability index — about 2.8KB gzipped for 1,200 variations — and the browser resolves state from it in under a millisecond, without asking the server anything.
wc-visual). SwatchKit reads and writes that same core term meta and mirrors it into its own keys, so nothing breaks if you switch the feature off.
Translation: your colours and images belong to your store, not to a plugin you are now stuck with. Everything core left out — size and label swatches, stock states, tooltips, shop-page swatches, per-product overrides, classic themes — SwatchKit adds on top.
Already using another swatch plugin? Tools → Import copies colours and images from GetWooPlugins, Brainstorm Force, RadiusTheme and WCBoost. It shows a preview before writing anything, never touches their data, and can be undone. 🔄
🎁 Free, and staying free
The things this category usually puts behind a licence:
<button> elements in a role="radiogroup" with a roving tabindex, arrow-key and Home/End navigation, and a focus ring that survives theme resets. Stock state is conveyed in text, not colour alone, so a screen reader hears "Blue, out of stock". The selected checkmark picks black or white from the swatch's own luminance, and prefers-reduced-motion turns every transition off.
🧑💻 For developers
woocommerce_dropdown_variation_attribute_options_html — the biggest source of theme conflicts, avoided structurally rather than patched.<select> stays in the DOM and remains the source of truth for submission. SwatchKit writes to it and dispatches a native change event, so WooCommerce's own handlers run normally — which is why quick view, bundle and composite plugins work without vendor-specific hacks..swk-swatches. Restyle by redefining variables; there is no !important to fight.swatchkit_swatch_html, swatchkit_swatch_classes, swatchkit_attribute_type, swatchkit_should_render, swatchkit_term_color, swatchkit_term_image_id, swatchkit_index_payload, swatchkit_settings, swatchkit_card_terms, swatchkit_card_placement, swatchkit_before_swatches and swatchkit_after_swatches.add_theme_support( 'swatchkit', array( 'stylesheet' => false ) ) to ship your own styles.window.SwatchKit.refresh(), .on( event, callback ) and .version. Dispatch swatchkit:refresh on document after injecting your own markup.[swatchkit product_id="123"] renders a product's swatches anywhere — page builders, landing pages, custom grids.assets/; npm install && npm run build rebuilds build/.Yes. Colour, image and size/label swatches are all free, including image tooltips, hover zoom and fill/fit cropping.
No. On activation every variation dropdown becomes a button swatch. Setting an attribute's type to Color or Image is optional.
Yes, and that is the main reason it exists. Availability is computed once when a product is saved and stored in its own database table, then read back as a single cached query and resolved in the browser with integer set intersection. A 1,200-variation product inlines about 14.7KB of JSON, roughly 2.8KB gzipped.
Two swatch plugins filtering the same dropdown will conflict. Deactivate the other one first. WooCommerce → Swatches → Tools lists any it detects.
It does not override any WooCommerce template, which is what usually breaks themes. If your theme still needs a CSS nudge, open a support thread and it will ship as a compatibility stylesheet.
No. Where your WooCommerce version supports core's visual attributes, SwatchKit writes to core's own term meta as well as its own. Uninstalling removes nothing unless you explicitly enable cleanup in Advanced settings, and core's meta is never deleted.
swatchkit_normalize_type lets an add-on add its own attribute type.[swatchkit] shortcode for showing a product's swatches anywhere.wc-visual attribute interoperability, with mirrored fallback meta.