{"id":368538,"date":"2026-09-20T07:55:48","date_gmt":"2026-09-20T07:55:48","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/plogins-swatch-variation-swatches-for-woocommerce\/"},"modified":"2026-09-20T07:55:33","modified_gmt":"2026-09-20T07:55:33","slug":"plogins-swatch","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/plogins-swatch\/","author":108511,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.14","stable_tag":"1.0.14","tested":"7.1.1","requires":"6.5","requires_php":"8.1","requires_plugins":null,"header_name":"Plogins Swatch - Variation Swatches for WooCommerce","header_author":"WPPoland.com","header_description":"Replace variation dropdowns with accessible colour and label swatches.","assets_banners_color":"8856d8","last_updated":"2026-09-20 07:55:33","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/plogins.com\/plogins-swatch\/","header_author_uri":"https:\/\/wppoland.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":25,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.14":{"tag":"1.0.14","author":"motylanogha","date":"2026-09-20 07:55:33","revision":3704001}},"upgrade_notice":{"1.0.14":"<p>Security release. A default installation is not exposed: the markup only becomes unsafe if another plugin hooks one of the swatch filters and returns unescaped HTML. Update, nothing else to do.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3703998,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3703998,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3703998,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3703998,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3704001,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"meta\":{\"title\":\"Plogins Swatch - Variation Swatches for WooCommerce, Live Preview\",\"author\":\"WPPoland\"},\"landingPage\":\"\\\/wp-admin\\\/admin.php?page=swatch-settings\",\"preferredVersions\":{\"php\":\"8.2\",\"wp\":\"latest\"},\"login\":true,\"steps\":[{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"woocommerce\"},\"options\":{\"activate\":true}},{\"step\":\"runPHP\",\"code\":\"<?php require '\\\/wordpress\\\/wp-load.php';\\ndelete_transient('_wc_activation_redirect');\\nupdate_option('woocommerce_onboarding_profile', array('skipped'=>true, 'completed'=>true));\\nif (function_exists('wc_get_product_id_by_sku') && class_exists('WC_Product_Simple')) {\\n  $demo = array('Trailwind Running Shoes'=>89, 'Harbor Leather Wallet'=>39, 'Amber Soy Candle'=>18, 'Coastal Pullover Hoodie'=>49, 'Field Canvas Backpack'=>59, 'Matte Ceramic Mug'=>14);\\n  foreach ($demo as $name=>$price) {\\n    $sku = 'demo-'.sanitize_title($name);\\n    if (wc_get_product_id_by_sku($sku)) { continue; }\\n    $p = new WC_Product_Simple();\\n    $p->set_name($name); $p->set_sku($sku); $p->set_regular_price((string)$price);\\n    $p->set_status('publish'); $p->set_catalog_visibility('visible');\\n    $p->save();\\n  }\\n}\"},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"plogins-swatch\"},\"options\":{\"activate\":true}}]}"}},"all_blocks":[],"tagged_versions":["1.0.14"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3703998,"resolution":"1","location":"assets","locale":"","width":1200,"height":774},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3703998,"resolution":"2","location":"assets","locale":"","width":1200,"height":424}},"screenshots":{"1":"Colour and button swatches on a single product page.","2":"The Swatch settings screen under the WooCommerce menu."}},"plugin_section":[],"plugin_tags":[37395,66595,130912,6602,286],"plugin_category":[45],"plugin_contributors":[264912],"plugin_business_model":[],"class_list":["post-368538","plugin","type-plugin","status-publish","hentry","plugin_tags-color-swatches","plugin_tags-product-attributes","plugin_tags-variation-swatches","plugin_tags-variations","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-motylanogha","plugin_committers-motylanogha"],"banners":{"banner":"https:\/\/ps.w.org\/plogins-swatch\/assets\/banner-772x250.png?rev=3703998","banner_2x":"https:\/\/ps.w.org\/plogins-swatch\/assets\/banner-1544x500.png?rev=3703998","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/plogins-swatch\/assets\/icon-128x128.png?rev=3703998","icon_2x":"https:\/\/ps.w.org\/plogins-swatch\/assets\/icon-256x256.png?rev=3703998","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/plogins-swatch\/assets\/screenshot-1.png?rev=3703998","caption":"Colour and button swatches on a single product page."},{"src":"https:\/\/ps.w.org\/plogins-swatch\/assets\/screenshot-2.png?rev=3703998","caption":"The Swatch settings screen under the WooCommerce menu."}],"raw_content":"<!--section=description-->\n<p>Swatch replaces WooCommerce's default variation <code>&lt;select&gt;<\/code> dropdowns with visual, accessible swatches on single product pages. Choose a swatch type per attribute (colour dots or button\/label pills) and assign a colour or label per term.<\/p>\n\n<p>The swatches drive WooCommerce's own variations form, so price, stock and the add-to-cart button update exactly as they do with the stock dropdowns. Selected and out-of-combination states are reflected automatically.<\/p>\n\n<p>The full source lives on GitHub at <a href=\"https:\/\/github.com\/wppoland\/plogins-swatch\">github.com\/wppoland\/plogins-swatch<\/a> if you want to read the code or report a problem.<\/p>\n\n<p><strong>Features<\/strong><\/p>\n\n<ul>\n<li>Colour and button\/label swatch types.<\/li>\n<li>Per-attribute type selection on the global attribute screen.<\/li>\n<li>Per-term colour (<code>sanitize_hex_color<\/code>) and custom label, stored as term meta.<\/li>\n<li>Wires into WooCommerce's native variations form, no jQuery, vanilla JS.<\/li>\n<li>Keyboard operable (radiogroup semantics, arrow keys) and screen-reader labelled.<\/li>\n<li>Focus-visible rings, sufficient contrast, reduced-motion friendly, no layout shift.<\/li>\n<li>Graceful fallback to the standard dropdown when an attribute has no swatch data.<\/li>\n<li>Swatches in shop and category listings too, off by default so your shop page does not change without you asking.<\/li>\n<li>Settings page under WooCommerce: enable\/disable, default swatch type and the shop-listing switch.<\/li>\n<\/ul>\n\n<p><strong>Self-contained.<\/strong> No external services, no account, no third-party dependencies.<\/p>\n\n<h3>External Services<\/h3>\n\n<p>Swatch does not connect to any external services. It makes no outbound HTTP requests, loads no remote scripts, fonts or CDN assets, and sends no telemetry or analytics. There is no account or API key.<\/p>\n\n<p>Everything is stored in your own database: the swatch type per attribute, the global defaults and a schema version are kept in the <code>swatch_attribute_types<\/code>, <code>swatch_settings<\/code> and <code>swatch_db_version<\/code> options, and each term's colour and label are stored as the <code>swatch_color<\/code> and <code>swatch_label<\/code> term meta on your WooCommerce attribute terms. The plugin sends no email.<\/p>\n\n<h3>Translations<\/h3>\n\n<p>Plogins Swatch is fully translatable and ships the <code>plogins-swatch.pot<\/code> template. Translations are delivered by WordPress.org language packs from translate.wordpress.org, which is where Polish, German and Spanish are being contributed; the package itself carries no compiled translation files.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install from <strong>Plugins &gt; Add New<\/strong> by searching for <em>Plogins Swatch<\/em>, or upload the <code>plogins-swatch<\/code> folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate it. WooCommerce must be active.<\/li>\n<li>Go to WooCommerce &gt; Swatch to tune the defaults.<\/li>\n<li>On Products &gt; Attributes, set a swatch colour or label on each attribute term.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"documentation%20and%20links\"><h3>Documentation and links<\/h3><\/dt>\n<dd><ul>\n<li><strong>Documentation<\/strong>: <a href=\"https:\/\/plogins.com\/plogins-swatch\/docs\/\">plogins.com\/plogins-swatch\/docs\/<\/a><\/li>\n<li><strong>Plugin page<\/strong>: <a href=\"https:\/\/plogins.com\/plogins-swatch\/\">plogins.com\/plogins-swatch\/<\/a><\/li>\n<li><strong>Source code<\/strong>: <a href=\"https:\/\/github.com\/wppoland\/plogins-swatch\">github.com\/wppoland\/plogins-swatch<\/a><\/li>\n<li><strong>Bug reports and feature requests<\/strong>: <a href=\"https:\/\/github.com\/wppoland\/plogins-swatch\/issues\">github.com\/wppoland\/plogins-swatch\/issues<\/a><\/li>\n<\/ul><\/dd>\n<dt id=\"does%20it%20require%20woocommerce%3F\"><h3>Does it require WooCommerce?<\/h3><\/dt>\n<dd><p>Yes. Swatch extends WooCommerce's variable products and does nothing without it.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20attributes%20i%20have%20not%20configured%3F\"><h3>What happens to attributes I have not configured?<\/h3><\/dt>\n<dd><p>They get the plugin's default swatch type (button swatches out of the box), the same as any attribute you have not given its own type. Only a colour attribute with no colours configured falls back to the dropdown automatically.<\/p><\/dd>\n<dt id=\"does%20it%20work%20without%20jquery%3F\"><h3>Does it work without jQuery?<\/h3><\/dt>\n<dd><p>Yes. The front-end is vanilla JavaScript that hooks WooCommerce's own variation events.<\/p><\/dd>\n<dt id=\"can%20shoppers%20pick%20variations%20with%20a%20keyboard%3F\"><h3>Can shoppers pick variations with a keyboard?<\/h3><\/dt>\n<dd><p>Yes. Swatches use radiogroup semantics, arrow-key navigation and visible focus rings.<\/p><\/dd>\n<dt id=\"does%20it%20work%20on%20mobile%3F\"><h3>Does it work on mobile?<\/h3><\/dt>\n<dd><p>Yes. Swatches stay in the native variations form with touch-friendly targets; no separate mobile app or script framework is required.<\/p><\/dd>\n<dt id=\"does%20this%20plugin%20work%20on%20wordpress%20multisite%3F\"><h3>Does this plugin work on WordPress Multisite?<\/h3><\/dt>\n<dd><p>Yes. This plugin is compatible with WordPress Multisite. Network activate it or activate it on individual sites; each site keeps its own settings and data.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.14<\/h4>\n\n<ul>\n<li>Security (low): swatch markup is now passed through <code>wp_kses()<\/code> with an explicit allowlist at the point it is printed. Every renderer escapes the values it writes, but each one ends in a filter, so what actually reached the page was whatever the last callback returned. An add-on, or anything else hooking those filters, could put unescaped markup on a storefront page. The allowlist covers the elements and attributes the swatches use, including <code>img<\/code> for the paid edition's image swatches and <code>data-*<\/code> for the values the script reads.<\/li>\n<li>Note: an inline colour that is not a hex value is dropped by WordPress when the markup is filtered, so a callback returning <code>rgb(...)<\/code> loses that colour. Colours saved on an attribute term are unaffected: they go through <code>sanitize_hex_color()<\/code> on the way in and on the way out.<\/li>\n<\/ul>\n\n<h4>1.0.13<\/h4>\n\n<ul>\n<li>Fixed: the PRO upgrade promo kept selling to people who had already bought the paid edition. Only the banner could be dismissed, so the sidebar promo and the locked feature cards followed a paying customer around for good. The promo now checks whether the paid edition is active and steps aside when it is.<\/li>\n<li>Fixed: arrow glyphs in the admin menu paths, and in the strings handed to translators. An arrow inside a translatable string makes the glyph every translator's problem and changes the layout in any locale that drops it.<\/li>\n<\/ul>\n\n<h4>1.0.12<\/h4>\n\n<ul>\n<li>Fixed: the installation steps told you to upload a <code>swatch<\/code> folder. The package has unpacked to <code>plogins-swatch<\/code> since the build started taking the folder name from the text domain, so following the readme put the plugin somewhere WordPress would not find it.<\/li>\n<li>Fixed: the link to the attributes screen had an arrow glyph inside the translated string, which made the arrow every translator's problem rather than the layout's.<\/li>\n<li>Changed: the features list now mentions swatches in shop and category listings. They arrived in 1.0.8 and the description never said so.<\/li>\n<li>Changed: Polish, German and Spanish are complete again at 52 of 52 strings. Ten strings, the whole shop-listing section among them, had no translation in any locale.<\/li>\n<\/ul>\n\n<h4>1.0.11<\/h4>\n\n<ul>\n<li>Fixed: deleting the plugin left the per-user \"dismiss\" flag from the PRO notice in the database. Uninstall now removes it for every user, not just the one who dismissed it.<\/li>\n<\/ul>\n\n<h4>1.0.10<\/h4>\n\n<ul>\n<li>Fixed: the PRO notice on the settings screen still sold shop-loop swatches as a paid feature. They have been in the free plugin since 1.0.8, behind the Swatches in the shop loop checkbox. What PRO adds there is the term image in place of the colour chip, and the notice now says so.<\/li>\n<\/ul>\n\n<h4>1.0.9<\/h4>\n\n<ul>\n<li>Changed: <strong>Swatches in the shop loop<\/strong> now shows that it hangs off the master switch above it. With <strong>Enable swatches<\/strong> off, the row goes quiet and says the listings will not render swatches yet, rather than taking a tick that does nothing. The state is rendered from the saved settings, so it is correct with JavaScript switched off, and the box stays reachable and saveable either way.<\/li>\n<li>Changed: both switches in that section tie their help text to the checkbox with <code>aria-describedby<\/code>, so a screen reader reads the explanation with the control.<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>New: <strong>Swatches in the shop loop<\/strong>, a setting on the Swatch screen. The archive renderer was always in this plugin, complete and working, but it was held shut by a hardcoded value that only the paid add-on ever flipped. That makes it a built-in feature the plugin refused to run, which the WordPress.org guidelines do not allow, so it is a setting now. Off by default, because it changes how your shop page looks.<\/li>\n<li>Colour and label swatches render in listings exactly as they do on the product page. Image swatches in listings are what the paid edition adds on top.<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Renamed to Plogins Swatch - Variation Swatches for WooCommerce so the name leads with the brand rather than a generic word, which is what the WordPress.org plugin review team asks for. The plugin slug is unchanged.<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Tested against WordPress 7.1. Verified by activating this build on a clean 7.1 install with WooCommerce 11.1, not by editing the header.<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Fixed the PRO promo on the settings screen quoting a price in PLN. PRO is priced and charged in EUR, so an admin on a Polish site was shown a zloty amount and then billed in euro, and the zloty figure was a fixed conversion that drifted from the real charge as the rate moved. The promo now shows the euro price that is actually taken.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Translations: completed Polish, German and Spanish for the PRO upgrade panel.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Added bundled Polish, German and Spanish translations for the plugin interface.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>First stable release.<\/li>\n<\/ul>\n\n<h4>0.1.5<\/h4>\n\n<ul>\n<li>Renamed to Plogins Swatch for WooCommerce for a more distinctive plugin name.<\/li>\n<\/ul>\n\n<h4>0.1.4<\/h4>\n\n<ul>\n<li>Swatch group filters <code>swatch\/swatch_group_vars<\/code> and <code>swatch\/swatch_group_classes<\/code> for PRO sizing and shapes.<\/li>\n<\/ul>\n\n<h4>0.1.3<\/h4>\n\n<ul>\n<li>Per-swatch filters (<code>swatch\/product_swatch_html<\/code>, <code>swatch\/archive_swatch_html<\/code>) and <code>swatch\/swatch_items<\/code> for PRO tooltips and add-ons.<\/li>\n<\/ul>\n\n<h4>0.1.2<\/h4>\n\n<ul>\n<li>Add optional archive-loop swatch preview via <code>swatch\/archive_enabled<\/code> and <code>swatch\/archive_html<\/code> filters for add-ons.<\/li>\n<\/ul>\n\n<h4>0.1.1<\/h4>\n\n<ul>\n<li>Add <code>swatch\/variation_gallery<\/code> filter and expose <code>swatch_variation_gallery<\/code> on variation JSON for add-ons.<\/li>\n<\/ul>\n\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Replace WooCommerce variation dropdowns with accessible colour and label swatches that wire straight into the native variations form.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/368538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=368538"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/motylanogha"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=368538"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=368538"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=368538"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=368538"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=368538"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=368538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}