Linux 软件免费装
Banner图

SwatchKit – Variation Swatches

开发者 modinatheme
更新时间 2026年9月30日 18:15
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

variable products product attributes woocommerce swatches variation swatches woocommerce color swatches

下载

1.1.0 1.0.0 1.2.0

详情介绍:

Your customer picks Black, then XXL, and finds out at the cart that the combination was never made. They do not email you about it. They leave. SwatchKit turns WooCommerce's variation dropdowns into colour, image and size swatches — and keeps them honest, so what is sold out looks sold out and what does not exist cannot be clicked. On a product with 12 variations or 5,000. 👉 Try the live demo — click real swatches on a 1,200-variation product, change every setting, no install needed. 📖 Read the documentation 🎥 Watch it work in three minutes: https://www.youtube.com/watch?v=Bhk81zbX9x4 🎯 Why swatches stop being right (and why this one does not) WooCommerce stops sending variation data to the browser once a product passes 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. Free. At any variation count. No upgrade prompt. 🧬 Built on WooCommerce's own data WooCommerce 10.9 added a first-party Color/Image attribute type (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: A separate Pro add-on is coming for shop-card add to cart and low-stock markers. Nothing on the list above will ever move into it. ⏱️ Set up in 60 seconds
  1. Activate. Every variation dropdown is already a swatch. 🎉
  2. Want real colours? Products → Attributes, set the attribute to Color or Image, edit its terms.
  3. Want it to match your theme? WooCommerce → Swatches — shape, size, spacing, borders, tooltips, stock styles and shop cards, each with a live preview that uses your real storefront stylesheet.
Settings export to a file and import on your next site, so your second store takes a minute rather than twenty. 💾 ⚡ Light, and quiet in your admin The storefront bundle is dependency-free vanilla JavaScript: 3.9KB of JS and 1.9KB of CSS, gzipped, loaded only where swatches appear. Swatches render server-side at their final size, so nothing jumps while the page loads, and everything works behind a page cache. No tracking. No outbound requests of any kind. No dashboard banners, no review nag, no greyed-out settings advertising an upgrade. The settings screen is the only place SwatchKit appears in your admin. 🤫 ♿ Accessible by construction Swatches are real <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 Built by ModinaTheme. WordPress 6.2+, WooCommerce 8.0+, PHP 7.4+, HPOS compatible.

安装:

  1. Install and activate the plugin.
  2. Every variable-product attribute dropdown becomes a swatch immediately — there is nothing to configure.
  3. To set colours or images per term, go to Products → Attributes, set an attribute's type to Color or Image swatch, then edit its terms. Colours use a colour picker; images are chosen from the Media Library.
  4. Global settings live under WooCommerce → Swatches, also linked as "Settings" on the Plugins screen.
The documentation covers every setting, image swatches, troubleshooting and the developer API.

屏幕截图:

  • The settings screen, with a live preview that uses your real storefront styles
  • Swatches on shop and category cards — pick a colour and the card's image follows
  • Correct out-of-stock and unavailable states on a 1,200-variation product
  • Colour swatches on the attribute term screen
  • Per-product swatch type and shape overrides
  • Stock behaviour: cross out, blur, dim or hide
  • System status, for quick support answers

升级注意事项:

1.2.0 Control how out-of-stock swatches look, move or hide the attribute name, and place swatches with the new Elementor widget or Bricks element. 1.1.0 Multi-colour swatches, a shortcode, more style settings, and fixes for the Clear link and for colours disappearing after a product save. 1.0.0 Initial release.

常见问题:

Are image swatches free?

Yes. Colour, image and size/label swatches are all free, including image tooltips, hover zoom and fill/fit cropping.

Do I have to configure anything?

No. On activation every variation dropdown becomes a button swatch. Setting an attribute's type to Color or Image is optional.

Does it really work with thousands of variations?

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.

Will it conflict with my existing swatch plugin?

Two swatch plugins filtering the same dropdown will conflict. Deactivate the other one first. WooCommerce → Swatches → Tools lists any it detects.

Does it work with my theme?

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.

Is my data locked in?

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.

更新日志:

1.2.0 1.1.0 1.0.0