{"id":385084,"date":"2026-10-13T11:05:48","date_gmt":"2026-10-13T11:05:48","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/kabaa-swatches-for-woocommerce\/"},"modified":"2026-10-18T10:42:52","modified_gmt":"2026-10-18T10:42:52","slug":"kabaa-swatches","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/kabaa-swatches\/","author":21027829,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.8.0","stable_tag":"0.8.0","tested":"7.1.3","requires":"6.0","requires_php":"8.0","requires_plugins":null,"header_name":"KABAA Swatches for WooCommerce","header_author":"Kazi Badrul Alam","header_description":"Variation swatches for WooCommerce: show product attributes as color, image and button swatches instead of dropdowns, with sold-out options marked.","assets_banners_color":"7d96f5","last_updated":"2026-10-18 10:42:52","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/kazibadrul.com","header_plugin_uri":"","header_author_uri":"https:\/\/kazibadrul.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":244,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.3.3":{"tag":"0.3.3","author":"badrul007","date":"2026-10-13 11:05:16","revision":3743674},"0.4.0":{"tag":"0.4.0","author":"badrul007","date":"2026-10-13 17:46:14","revision":3744585},"0.5.0":{"tag":"0.5.0","author":"badrul007","date":"2026-10-15 12:34:53","revision":3748467},"0.6.0":{"tag":"0.6.0","author":"badrul007","date":"2026-10-15 17:31:01","revision":3749039},"0.7.0":{"tag":"0.7.0","author":"badrul007","date":"2026-10-17 11:17:29","revision":3751844},"0.8.0":{"tag":"0.8.0","author":"badrul007","date":"2026-10-18 10:42:52","revision":3752900}},"upgrade_notice":{"0.8.0":"<p>German translation included (Germany, Austria, Switzerland), used when the site language is\nDeutsch. No settings change.<\/p>","0.7.0":"<p>Help links to the setup guide on every Swatches screen, and a welcome screen for new installs.<\/p>","0.6.0":"<p>New Tile swatch type: each option&#039;s photo with its price, and a gallery preview on hover.\nNothing changes until you set an attribute to Tile.<\/p>","0.5.0":"<p>Swatches on shop and category pages, separate swatch width and height, and a font size\nsetting. Your current size carries over.<\/p>","0.4.0":"<p>Swatches for custom product attributes, and color filled in from a color name.<\/p>","0.3.3":"<p>Tooltips now show instantly on hover and keyboard focus. No settings change.<\/p>","0.3.2":"<p>Maintenance release. No settings change.<\/p>","0.3.1":"<p>Selected swatches look different: a ring outside the swatch instead of a thickened border, so\nselection stays visible on dark colours. Set the selection style to Border to keep the old look.<\/p>","0.2.0":"<p>Settings have moved to the new Swatches menu. Nothing needs reconfiguring.<\/p>","0.1.0":"<p>First release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3744585,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3744585,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3744585,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3744585,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3752900,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"meta\":{\"title\":\"KABAA Swatches for WooCommerce demo\",\"description\":\"A small WooCommerce store with colour and button swatches, sold-out options, and a product past the 30-variation preload.\",\"author\":\"badrul007\",\"categories\":[\"WooCommerce\"]},\"landingPage\":\"\\\/product\\\/classic-hoodie\\\/\",\"preferredVersions\":{\"php\":\"8.3\",\"wp\":\"latest\"},\"features\":{\"networking\":true},\"login\":true,\"steps\":[{\"step\":\"installTheme\",\"themeData\":{\"resource\":\"wordpress.org\\\/themes\",\"slug\":\"storefront\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"woocommerce\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"kabaa-swatches\"},\"options\":{\"activate\":true}},{\"step\":\"setSiteOptions\",\"options\":{\"blogname\":\"KABAA Swatches demo\",\"woocommerce_onboarding_profile\":{\"skipped\":true},\"woocommerce_coming_soon\":\"no\",\"woocommerce_store_pages_only\":\"no\",\"woocommerce_currency\":\"USD\",\"woocommerce_default_country\":\"US:CA\",\"woocommerce_show_marketplace_suggestions\":\"no\",\"woocommerce_allow_tracking\":\"no\"}},{\"step\":\"runPHP\",\"code\":\"<?php\\n\\\/**\\n * Demo store for the wordpress.org Live Preview (WordPress Playground).\\n *\\n * Runs once, as the blueprint's runPHP step, after WooCommerce and this plugin\\n * are active. Not part of the plugin. Build: docs\\\/wporg-art\\\/blueprint\\\/build.py\\n *\\n * Creates Color (colour swatches) and Size (button swatches), and two variable\\n * products: one under WooCommerce's 30-variation preload, one past it, each\\n * with sold-out options and a generated image per colour.\\n *\\\/\\n\\nrequire_once '\\\/wordpress\\\/wp-load.php';\\nrequire_once ABSPATH . 'wp-admin\\\/includes\\\/image.php';\\nwp_set_current_user( 1 );\\n\\n$colors = array(\\n\\t'Navy'    => '#1e3a8a',\\n\\t'Red'     => '#dc2626',\\n\\t'Green'   => '#16a34a',\\n\\t'Mustard' => '#eab308',\\n\\t'Black'   => '#111827',\\n\\t'White'   => '#f9fafb',\\n);\\n$sizes  = array( 'S', 'M', 'L', 'XL', 'XXL', '3XL' );\\n\\n$attributes = array(\\n\\t'color' => array( 'Color', array_keys( $colors ) ),\\n\\t'size'  => array( 'Size', $sizes ),\\n);\\n\\n$term_ids = array();\\nforeach ( $attributes as $slug => $def ) {\\n\\tif ( ! wc_attribute_taxonomy_id_by_name( $slug ) ) {\\n\\t\\twc_create_attribute(\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'name'     => $def[0],\\n\\t\\t\\t\\t'slug'     => $slug,\\n\\t\\t\\t\\t'type'     => 'select',\\n\\t\\t\\t\\t'order_by' => 'menu_order',\\n\\t\\t\\t)\\n\\t\\t);\\n\\t}\\n\\t$taxonomy = 'pa_' . $slug;\\n\\tif ( ! taxonomy_exists( $taxonomy ) ) {\\n\\t\\tregister_taxonomy( $taxonomy, array( 'product' ), array( 'hierarchical' => false ) );\\n\\t}\\n\\tforeach ( $def[1] as $position => $name ) {\\n\\t\\t$term = term_exists( $name, $taxonomy );\\n\\t\\tif ( ! $term ) {\\n\\t\\t\\t$term = wp_insert_term( $name, $taxonomy );\\n\\t\\t}\\n\\t\\t$term_id = (int) $term['term_id'];\\n\\n\\t\\t$term_ids[ $taxonomy ][ $name ] = $term_id;\\n\\t\\t\\\/\\\/ Custom ordering, so sizes read S, M, L\\u2026 rather than alphabetically.\\n\\t\\tupdate_term_meta( $term_id, 'order', $position );\\n\\t\\tif ( isset( $colors[ $name ] ) ) {\\n\\t\\t\\tupdate_term_meta( $term_id, 'kabaa_swatches_color', $colors[ $name ] );\\n\\t\\t}\\n\\t}\\n}\\ndelete_transient( 'wc_attribute_taxonomies' );\\n\\nupdate_option(\\n\\t'kabaa_swatches_settings',\\n\\tarray(\\n\\t\\t'attribute_types'     => array(\\n\\t\\t\\t'pa_color' => 'color',\\n\\t\\t\\t'pa_size'  => 'button',\\n\\t\\t),\\n\\t\\t'card_attribute_mode' => 'all',\\n\\t\\t'card_order'          => array( 'pa_color', 'pa_size' ),\\n\\t),\\n\\ttrue\\n);\\n\\n\\\/**\\n * A product picture in one colour, drawn with GD and added to the media library.\\n *\\n * @param string $label File and title label.\\n * @param string $hex   Garment colour.\\n * @param bool   $tee   Tee (short sleeves) or hoodie (long sleeves, hood).\\n *\\n * @return int Attachment ID, or 0 when GD is unavailable.\\n *\\\/\\nfunction kabaa_demo_image( string $label, string $hex, bool $tee ): int {\\n\\tif ( ! function_exists( 'imagecreatetruecolor' ) ) {\\n\\t\\treturn 0;\\n\\t}\\n\\t$size = 800;\\n\\t$img  = imagecreatetruecolor( $size, $size );\\n\\timagefill( $img, 0, 0, imagecolorallocate( $img, 241, 243, 246 ) );\\n\\n\\tlist( $r, $g, $b ) = sscanf( $hex, '#%02x%02x%02x' );\\n\\t$fill   = imagecolorallocate( $img, $r, $g, $b );\\n\\t$shade  = imagecolorallocate( $img, (int) ( $r * 0.8 ), (int) ( $g * 0.8 ), (int) ( $b * 0.8 ) );\\n\\t$sleeve = $tee ? 330 : 600;\\n\\n\\t\\\/\\\/ Body and sleeves as one outline: shoulders, sleeve, side, hem, mirrored.\\n\\t$outline = array(\\n\\t\\t300, 170, 200, 200, 110, 270, 110 + ( $tee ? 40 : 0 ), $sleeve, 200, $sleeve - ( $tee ? 0 : 20 ),\\n\\t\\t220, 300, 220, 660, 580, 660, 580, 300,\\n\\t\\t600, $sleeve - ( $tee ? 0 : 20 ), 690 - ( $tee ? 40 : 0 ), $sleeve, 690, 270, 600, 200, 500, 170,\\n\\t);\\n\\timagefilledpolygon( $img, $outline, $fill );\\n\\tif ( $tee ) {\\n\\t\\timagefilledarc( $img, 400, 170, 200, 110, 0, 180, $shade, IMG_ARC_PIE );\\n\\t} else {\\n\\t\\timagefilledellipse( $img, 400, 175, 230, 150, $shade );\\n\\t\\timagefilledrectangle( $img, 300, 520, 500, 600, $shade );\\n\\t}\\n\\n\\t$file = wp_upload_bits( sanitize_file_name( $label ) . '.png', null, '' );\\n\\timagepng( $img, $file['file'] );\\n\\timagedestroy( $img );\\n\\n\\t$id = wp_insert_attachment(\\n\\t\\tarray(\\n\\t\\t\\t'post_title'     => $label,\\n\\t\\t\\t'post_mime_type' => 'image\\\/png',\\n\\t\\t\\t'post_status'    => 'inherit',\\n\\t\\t),\\n\\t\\t$file['file']\\n\\t);\\n\\twp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file['file'] ) );\\n\\n\\treturn (int) $id;\\n}\\n\\n\\\/**\\n * A variable product with every colour x size combination.\\n *\\n * @param string   $name     Product name.\\n * @param int      $price    Price of every variation.\\n * @param string[] $names    Colours to use.\\n * @param string[] $use      Sizes to use.\\n * @param string[] $sold_out \\\"Color|Size\\\" pairs out of stock; \\\"Color|*\\\" for a whole colour.\\n * @param bool     $tee      Tee or hoodie pictures.\\n *\\\/\\nfunction kabaa_demo_product( string $name, int $price, array $names, array $use, array $sold_out, bool $tee, array $term_ids, array $colors ): int {\\n\\t$product = new WC_Product_Variable();\\n\\t$product->set_name( $name );\\n\\t$product->set_status( 'publish' );\\n\\t$product->set_short_description( 'A demo product for KABAA Swatches. Pick a colour and size: the picture follows your choice, and crossed-out options are out of stock.' );\\n\\n\\t$attrs = array();\\n\\tforeach ( array( 'pa_color' => $names, 'pa_size' => $use ) as $taxonomy => $values ) {\\n\\t\\t$attr = new WC_Product_Attribute();\\n\\t\\t$attr->set_id( wc_attribute_taxonomy_id_by_name( $taxonomy ) );\\n\\t\\t$attr->set_name( $taxonomy );\\n\\t\\t$attr->set_options(\\n\\t\\t\\tarray_map(\\n\\t\\t\\t\\tstatic function ( $value ) use ( $term_ids, $taxonomy ) {\\n\\t\\t\\t\\t\\treturn $term_ids[ $taxonomy ][ $value ];\\n\\t\\t\\t\\t},\\n\\t\\t\\t\\t$values\\n\\t\\t\\t)\\n\\t\\t);\\n\\t\\t$attr->set_visible( true );\\n\\t\\t$attr->set_variation( true );\\n\\t\\t$attrs[] = $attr;\\n\\t}\\n\\t$product->set_attributes( $attrs );\\n\\n\\t$images = array();\\n\\tforeach ( $names as $color ) {\\n\\t\\t$images[ $color ] = kabaa_demo_image( $name . ' ' . $color, $colors[ $color ], $tee );\\n\\t}\\n\\tif ( $images[ $names[0] ] ) {\\n\\t\\t$product->set_image_id( $images[ $names[0] ] );\\n\\t}\\n\\t$id = $product->save();\\n\\n\\tforeach ( $names as $color ) {\\n\\t\\tforeach ( $use as $size ) {\\n\\t\\t\\t$variation = new WC_Product_Variation();\\n\\t\\t\\t$variation->set_parent_id( $id );\\n\\t\\t\\t$variation->set_attributes(\\n\\t\\t\\t\\tarray(\\n\\t\\t\\t\\t\\t'pa_color' => sanitize_title( $color ),\\n\\t\\t\\t\\t\\t'pa_size'  => sanitize_title( $size ),\\n\\t\\t\\t\\t)\\n\\t\\t\\t);\\n\\t\\t\\t$variation->set_regular_price( (string) $price );\\n\\t\\t\\t$variation->set_image_id( $images[ $color ] );\\n\\t\\t\\t$out = in_array( $color . '|' . $size, $sold_out, true ) || in_array( $color . '|*', $sold_out, true );\\n\\t\\t\\t$variation->set_stock_status( $out ? 'outofstock' : 'instock' );\\n\\t\\t\\t$variation->save();\\n\\t\\t}\\n\\t}\\n\\tWC_Product_Variable::sync( $id );\\n\\twc_delete_product_transients( $id );\\n\\n\\treturn $id;\\n}\\n\\nif ( ! get_page_by_path( 'classic-hoodie', OBJECT, 'product' ) ) {\\n\\t\\\/\\\/ 20 variations: WooCommerce sends them all with the page.\\n\\tkabaa_demo_product( 'Classic Hoodie', 45, array( 'Navy', 'Red', 'Green', 'Mustard', 'Black' ), array( 'S', 'M', 'L', 'XL' ), array( 'Mustard|*', 'Red|XL', 'Navy|S' ), false, $term_ids, $colors );\\n\\t\\\/\\\/ 36 variations: past the 30-variation preload, so availability comes over AJAX.\\n\\tkabaa_demo_product( 'Everyday Tee', 25, array_keys( $colors ), $sizes, array( 'Green|*', 'Black|S', 'Black|M', 'White|3XL' ), true, $term_ids, $colors );\\n}\\n\\nif ( wc_get_page_id( 'shop' ) < 1 ) {\\n\\tWC_Install::create_pages();\\n}\\nflush_rewrite_rules();\\n\"}]}"}},"all_blocks":[],"tagged_versions":["0.3.3","0.4.0","0.5.0","0.6.0","0.7.0","0.8.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3746996,"resolution":"1","location":"assets","locale":"","width":1600,"height":1000},"screenshot-10.png":{"filename":"screenshot-10.png","revision":3748497,"resolution":"10","location":"assets","locale":"","width":1600,"height":1000},"screenshot-11.png":{"filename":"screenshot-11.png","revision":3748497,"resolution":"11","location":"assets","locale":"","width":1600,"height":1000},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3746996,"resolution":"2","location":"assets","locale":"","width":1600,"height":1000},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3746996,"resolution":"3","location":"assets","locale":"","width":1600,"height":1000},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3746996,"resolution":"4","location":"assets","locale":"","width":1600,"height":1000},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3746996,"resolution":"5","location":"assets","locale":"","width":1600,"height":1000},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3746996,"resolution":"6","location":"assets","locale":"","width":1600,"height":1000},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3746996,"resolution":"7","location":"assets","locale":"","width":1600,"height":1000},"screenshot-8.png":{"filename":"screenshot-8.png","revision":3748497,"resolution":"8","location":"assets","locale":"","width":1600,"height":1000},"screenshot-9.png":{"filename":"screenshot-9.png","revision":3748497,"resolution":"9","location":"assets","locale":"","width":1600,"height":1000}},"screenshots":{"1":"Image swatches on a product page. Each option shows its own picture, the chosen one carries a ring, and the product photo follows the choice.","2":"Swatches on a shop page product card. The chosen colour carries a ring, colours that can't go with it are crossed out, and the price follows the choice.","3":"Sold-out options marked on the shop card, on products of any size.","4":"Swatches &gt; Settings &gt; Product page \u2014 shape, size, font size, tooltips and how a selected swatch is marked, with a live preview.","5":"Swatches &gt; Settings &gt; Shop page \u2014 which attributes product cards show, in the order you drag them into, with a card preview.","6":"The Swatches tab of a product \u2014 hide its card swatches, choose its attributes, or untick values the card shouldn't show.","7":"A custom attribute made inside a product, shown as button swatches, set from that product's Swatches tab.","8":"Tile swatches on a product page: each option's own photo with its price underneath. Sale prices show struck through, and sold-out options are crossed out.","9":"Hovering a tile previews its photo in the main product image.","10":"Swatches &gt; Settings &gt; Product page \u2014 the tile price setting, with a preview of tiles drawn from a product in your store.","11":"The Swatches tab of a product with an attribute set to Tile. Photos come from the variations; an image here is only a fallback."}},"plugin_section":[],"plugin_tags":[37395,66595,130912,6602,286],"plugin_category":[45],"plugin_contributors":[286409],"plugin_business_model":[],"class_list":["post-385084","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-badrul007","plugin_committers-badrul007","plugin_support_reps-badrul007"],"banners":{"banner":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/banner-772x250.png?rev=3744585","banner_2x":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/banner-1544x500.png?rev=3744585","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/icon-128x128.png?rev=3744585","icon_2x":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/icon-256x256.png?rev=3744585","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-1.png?rev=3746996","caption":"Image swatches on a product page. Each option shows its own picture, the chosen one carries a ring, and the product photo follows the choice."},{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-2.png?rev=3746996","caption":"Swatches on a shop page product card. The chosen colour carries a ring, colours that can't go with it are crossed out, and the price follows the choice."},{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-3.png?rev=3746996","caption":"Sold-out options marked on the shop card, on products of any size."},{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-4.png?rev=3746996","caption":"Swatches &gt; Settings &gt; Product page \u2014 shape, size, font size, tooltips and how a selected swatch is marked, with a live preview."},{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-5.png?rev=3746996","caption":"Swatches &gt; Settings &gt; Shop page \u2014 which attributes product cards show, in the order you drag them into, with a card preview."},{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-6.png?rev=3746996","caption":"The Swatches tab of a product \u2014 hide its card swatches, choose its attributes, or untick values the card shouldn't show."},{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-7.png?rev=3746996","caption":"A custom attribute made inside a product, shown as button swatches, set from that product's Swatches tab."},{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-8.png?rev=3748497","caption":"Tile swatches on a product page: each option's own photo with its price underneath. Sale prices show struck through, and sold-out options are crossed out."},{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-9.png?rev=3748497","caption":"Hovering a tile previews its photo in the main product image."},{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-10.png?rev=3748497","caption":"Swatches &gt; Settings &gt; Product page \u2014 the tile price setting, with a preview of tiles drawn from a product in your store."},{"src":"https:\/\/ps.w.org\/kabaa-swatches\/assets\/screenshot-11.png?rev=3748497","caption":"The Swatches tab of a product with an attribute set to Tile. Photos come from the variations; an image here is only a fallback."}],"raw_content":"<!--section=description-->\n<p>WooCommerce shows product variations as dropdown menus. A shopper choosing a colour reads\nthe word \"Ocean Blue\" instead of seeing it, and on a phone the dropdown opens a picker that\ntakes them off the page entirely.<\/p>\n\n<p>KABAA Swatches replaces those dropdowns with swatches a shopper can see and tap.<\/p>\n\n<p>https:\/\/www.youtube.com\/watch?v=s-srg4spJ-g<\/p>\n\n<p>Works with classic themes that use WooCommerce's standard variation form.<\/p>\n\n<p>Setup guide, every screen with a screenshot: <a href=\"https:\/\/kazibadrul.com\/kabaa-swatches\/docs\/?utm_source=wordpress.org&amp;utm_medium=listing&amp;utm_campaign=readme&amp;utm_content=description\">kazibadrul.com\/kabaa-swatches\/docs<\/a><\/p>\n\n<h4>Out-of-stock handling<\/h4>\n\n<p><strong>Works on products with many variations.<\/strong><\/p>\n\n<p>WooCommerce sends variation data to the browser only up to a threshold (30 variations by\ndefault). Below it, the plugin uses that data and adds no extra request. Above it, the plugin\nfetches availability sized to the number of swatches on screen, not the number of variations,\nand keeps sold-out combinations marked as the shopper chooses.<\/p>\n\n<p><strong>Independent of catalog visibility.<\/strong><\/p>\n\n<p>Out-of-stock swatches work the same whether WooCommerce's \"Hide out of stock items from the\ncatalog\" option is on or off, so you can keep sold-out products visible in your shop.<\/p>\n\n<h4>What it does<\/h4>\n\n<ul>\n<li>Color, image and button swatches on the single product page<\/li>\n<li>Tile swatches: each option's own photo with its price underneath, following what is already\nchosen. Hovering a tile previews its photo in the product gallery<\/li>\n<li>Swatches on shop, category, tag and search pages too: pick options right on the card, see that\noption's photo and price, and add the variation to the cart without leaving the page<\/li>\n<li>Choose which attributes shop cards show and in which order, store-wide or per product, which of\ntheir values, their spacing and alignment, and whether they sit before or after the add-to-cart\nbutton<\/li>\n<li>On a card, options with nothing in stock alongside your choice are marked as you pick<\/li>\n<li>Works with custom attributes created inside a product, set from the product's own Swatches tab<\/li>\n<li>Name a term after a color (Navy, Tomato) and its swatch color fills itself<\/li>\n<li>Image swatches fall back to the variation's own featured image when a term has none<\/li>\n<li>Round or square, any width and height, and a text size for button swatches \u2014 no CSS to write<\/li>\n<li>Selection shown as a ring outside the swatch, so it stays visible on a black swatch<\/li>\n<li>Choose ring, fill or border, and the colour, or leave it to pick per swatch type<\/li>\n<li>Tooltips on hover and on keyboard focus<\/li>\n<li>Shows the selected term's name beside the attribute label<\/li>\n<li>Marks sold-out terms as crossed out, blurred, or hidden, on product pages and shop cards<\/li>\n<li>Any attribute can be switched back to a plain dropdown, keeping its colours and images<\/li>\n<li>Correct for products with any number of variations<\/li>\n<li>Backorders count as purchasable, because they are<\/li>\n<li>German included for Germany, Austria and Switzerland, used when the site language is Deutsch\n(WordPress 6.5 or newer)<\/li>\n<\/ul>\n\n<h4>Built to stay out of the way<\/h4>\n\n<ul>\n<li>WooCommerce's own <code>&lt;select&gt;<\/code> stays in the form and stays in charge. The plugin writes to it\nand listens to it; it never resolves variations or touches add to cart.<\/li>\n<li>Swatches are real radio inputs, so keyboard navigation, focus and selected state come from\nthe browser itself.<\/li>\n<li>No template is overridden. If a theme renders its own variation markup, you get WooCommerce's\nnormal dropdowns and the product page keeps working.<\/li>\n<li>Assets load only on pages that show swatches. Shop cards never call back to the server, so\nthey keep working on pages served from a full-page cache.<\/li>\n<li>Stores its settings in a single option, and custom attribute settings on their own product.\nNo tracking and no external services.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin. A short welcome screen opens once, pointing to where setup\nhappens. Nothing changes on your store yet \u2014 every attribute starts as a dropdown.<\/li>\n<li>Go to <strong>Swatches &gt; Attributes<\/strong> and set a swatch type on an attribute. The same control is\non each attribute's own form under Products &gt; Attributes.<\/li>\n<li>For a colour attribute, edit its terms and give each one a colour. For an image attribute,\ngive each term an image, or leave it and let the variation image be used.\nFor an attribute created inside a product, use that product's <strong>Swatches<\/strong> tab instead.<\/li>\n<li>Adjust shape, size, tooltips and out-of-stock display at <strong>Swatches &gt; Settings<\/strong>.<\/li>\n<\/ol>\n\n<p>Everything the plugin does lives under the <strong>Swatches<\/strong> menu: Settings, Attributes (set the\ntype for every attribute in one place), Terms (jump to the terms that need a colour or image)\nand Status (read-only diagnostics for support).<\/p>\n\n<p>Terms are edited on WordPress's own screens rather than in a rebuilt copy, so you keep its\nsearch, bulk actions and quick edit.<\/p>\n\n<p>Step by step, with a screenshot of every screen: <a href=\"https:\/\/kazibadrul.com\/kabaa-swatches\/docs\/?utm_source=wordpress.org&amp;utm_medium=listing&amp;utm_campaign=readme&amp;utm_content=installation\">the setup guide<\/a>.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"is%20there%20a%20setup%20guide%3F\"><h3>Is there a setup guide?<\/h3><\/dt>\n<dd><p>Yes: <a href=\"https:\/\/kazibadrul.com\/kabaa-swatches\/docs\/?utm_source=wordpress.org&amp;utm_medium=listing&amp;utm_campaign=readme&amp;utm_content=faq\">kazibadrul.com\/kabaa-swatches\/docs<\/a> walks through\nevery screen with a screenshot \u2014 swatch types, term colours and images, custom attributes, tile\nswatches, shop cards, out of stock and troubleshooting.<\/p><\/dd>\n<dt id=\"do%20i%20have%20to%20change%20my%20theme%3F\"><h3>Do I have to change my theme?<\/h3><\/dt>\n<dd><p>No. The plugin hooks a WooCommerce filter that classic themes already use.<\/p><\/dd>\n<dt id=\"my%20theme%20has%20a%20custom%20variation%20form%20and%20i%20see%20dropdowns.\"><h3>My theme has a custom variation form and I see dropdowns.<\/h3><\/dt>\n<dd><p>That theme renders its own markup and does not call the WooCommerce function this plugin\nfilters. The product page keeps working normally; it just will not show swatches.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20custom%20attributes%20created%20inside%20a%20product%3F\"><h3>Does it work with custom attributes created inside a product?<\/h3><\/dt>\n<dd><p>Yes. Open the product's Swatches tab, choose a swatch type for the attribute, and give each\nvalue a color or image. The settings belong to that product only.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20more%20than%2030%20variations%3F\"><h3>Does it work with more than 30 variations?<\/h3><\/dt>\n<dd><p>Yes, including out-of-stock marking.<\/p><\/dd>\n<dt id=\"do%20i%20need%20%22hide%20out%20of%20stock%20items%20from%20the%20catalog%22%20switched%20on%3F\"><h3>Do I need \"Hide out of stock items from the catalog\" switched on?<\/h3><\/dt>\n<dd><p>No. That setting has no effect on swatches here.<\/p><\/dd>\n<dt id=\"does%20it%20send%20anything%20to%20a%20third%20party%3F\"><h3>Does it send anything to a third party?<\/h3><\/dt>\n<dd><p>No.<\/p><\/dd>\n<dt id=\"does%20it%20work%20on%20shop%20and%20category%20pages%3F\"><h3>Does it work on shop and category pages?<\/h3><\/dt>\n<dd><p>Yes: the shop, categories, tags, search results, product shortcodes and related products. Each\nvariable product card shows its swatches before or after the add-to-cart button. Shoppers can pick\noptions on the card and, when the card shows every option, add the variation to the cart there,\nwhatever the number of variations. Otherwise the product opens with the options already chosen.<\/p><\/dd>\n<dt id=\"can%20i%20choose%20which%20products%20show%20swatches%20on%20the%20shop%20page%3F\"><h3>Can I choose which products show swatches on the shop page?<\/h3><\/dt>\n<dd><p>Yes. Swatches &gt; Settings &gt; Shop page chooses the attributes for every card (automatic, all, or the\nones you pick), or turns card swatches off. A product's own Swatches tab can choose different\nattributes for that product, or hide its swatches on shop pages.<\/p><\/dd>\n<dt id=\"my%20theme%27s%20product%20cards%20look%20different.%20will%20it%20work%3F\"><h3>My theme's product cards look different. Will it work?<\/h3><\/dt>\n<dd><p>The plugin finds each card's image and add-to-cart button on its own. If your theme lays out cards\nunusually, Swatches &gt; Settings &gt; Advanced lets you name them with a CSS selector.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20i%20delete%20the%20plugin%3F\"><h3>What happens if I delete the plugin?<\/h3><\/dt>\n<dd><p>It removes only what it created: its settings, the colours and images you set on attribute\nterms, and the swatch settings saved on products (custom attributes and the shop card choice). It never deletes an attribute, a term, a product, a variation, or anything in your media\nlibrary. A swatch image is a reference to a file in your media library \u2014 deleting the plugin\nremoves the reference, never the file. Your store keeps working with WooCommerce's normal\ndropdowns.<\/p>\n\n<p>Deactivating is different again: that changes nothing at all, so you can switch the plugin off\nand back on without losing any setup.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.8.0<\/h4>\n\n<ul>\n<li><strong>German translation included.<\/strong> When the site language is Deutsch (Germany, Austria or\nSwitzerland), the plugin's admin screens, swatches and shop-card buttons are in German, in\nSwiss spelling on Swiss sites. Needs WordPress 6.5 or newer. An approved translation from\ntranslate.wordpress.org replaces it automatically.<\/li>\n<\/ul>\n\n<h4>0.7.0<\/h4>\n\n<ul>\n<li>A short welcome screen on a new install, listing the swatch types and leading to\nSwatches &gt; Attributes, where setup happens. It shows once, and never on update.<\/li>\n<li>Help links on every screen: Docs and Support on the Plugins list, and a link to the matching\nsection of the setup guide on Settings, Attributes, Terms, Status and the product Swatches tab.<\/li>\n<\/ul>\n\n<h4>0.6.0<\/h4>\n\n<ul>\n<li><strong>Tile swatches.<\/strong> A new swatch type for global and custom attributes: each option shows its\nvariation's own photo with its price underneath. The price follows the options already chosen,\nas one price or a range, with sale prices struck through and sold-out options marked, on\nproducts of any size.<\/li>\n<li>Hovering or tabbing to a tile previews its photo in the main product image, and a chosen tile\nkeeps its photo before the other options are picked.<\/li>\n<li>New Tile width and Tile price settings in Swatches &gt; Settings &gt; Product page. The live preview\nshows tiles from one of your own products.<\/li>\n<li>On shop cards, a tile attribute shows as an image swatch.<\/li>\n<\/ul>\n\n<h4>0.5.0<\/h4>\n\n<ul>\n<li><strong>Swatches on shop and category pages.<\/strong> Pick options on the product card: the image follows\nyour choice, options out of stock alongside it are marked, and a complete choice can be added\nto the cart right there, on products of any size. Sold-out options are marked beyond 30\nvariations too.<\/li>\n<li>The card's price follows your choice, and its button reads \"Add to cart\" from the start: pressed\nbefore every option is picked, the card shows which ones are missing.<\/li>\n<li>Choose the card attributes in Swatches &gt; Settings &gt; Shop page (automatic, all, or chosen), or\nper product in its Swatches tab, where a product can also hide its card swatches or choose which\nof their values the card shows. Sort attributes into the order cards show them, set the spacing\nand alignment, and place them before or after the add-to-cart button. Long rows collapse behind\na \"+N\" control, and card swatches stay easy to tap on phones.<\/li>\n<li>Swatches &gt; Settings is reorganised into Product page, Shop page and Advanced sections, with a\nlive preview of your swatches and of a shop card.<\/li>\n<li>Swatch width and height are now set separately, for every shape. A round swatch with a\ndifferent width and height is an oval; a sample on the settings screen shows the result as\nyou type.<\/li>\n<li>New font size setting for button swatches, and for color or image swatches shown as their\nname. Leave it empty to keep following the theme.<\/li>\n<li>A size saved by an earlier version is used as both width and height, so swatches look the\nsame after updating.<\/li>\n<li>For theme developers: the <code>--kabaa-swatch-size<\/code> CSS variable is replaced by\n  --kabaa-swatch-width and <code>--kabaa-swatch-height<\/code>.<\/li>\n<\/ul>\n\n<h4>0.4.0<\/h4>\n\n<ul>\n<li>Custom attributes created inside a product can now be swatches. A new Swatches tab on\nvariable products sets the swatch type and each value's color or image.<\/li>\n<li>Name a term after a color (Navy, Tomato, Dark Olive Green) and an empty swatch color fills\nitself. A color name typed into the color field becomes its hex value. Worked out by the\nbrowser; nothing is sent anywhere.<\/li>\n<\/ul>\n\n<h4>0.3.3<\/h4>\n\n<ul>\n<li>Tooltips now appear instantly on hover and on keyboard focus, and read \"Attribute: Term\"\n(for example \"Colour: Ocean Blue\"). Tapping a swatch on a phone shows its tooltip too.<\/li>\n<li>Swatches no longer carry a <code>title<\/code> attribute, so the browser's own delayed tooltip is gone.<\/li>\n<\/ul>\n\n<h4>0.3.2<\/h4>\n\n<ul>\n<li>The stylesheet now loads in the page head on product pages through WordPress's asset system;\nthe plugin no longer prints any inline style tag.<\/li>\n<li>Write requests now accept the security token only from the submitted form, never from the URL.<\/li>\n<li>Readme rewritten to describe only what this plugin does.<\/li>\n<li>Translation template regenerated with every string.<\/li>\n<\/ul>\n\n<h4>0.3.1<\/h4>\n\n<ul>\n<li><strong>Selected swatches now show a ring drawn outside the swatch.<\/strong> The previous thickened border\nwas invisible on a black swatch and hard to see on any dark one.<\/li>\n<li>Added a selection style setting \u2014 automatic, ring, fill or border \u2014 and a selection colour.\nAutomatic uses a ring for colour and image swatches and a fill for button swatches.<\/li>\n<li>The label colour on a filled swatch is now worked out from the selection colour so it stays\nreadable.<\/li>\n<li>The out-of-stock stroke is now legible on dark swatches, light swatches and images alike.<\/li>\n<li>Keyboard focus is now a dashed outline, distinct from the selection ring.<\/li>\n<li>If you preferred the old appearance, set the selection style to Border.<\/li>\n<\/ul>\n\n<h4>0.2.0<\/h4>\n\n<ul>\n<li>The plugin now has its own <strong>Swatches<\/strong> menu, with Settings, Attributes, Terms and Status screens.<\/li>\n<li>Swatch types for every attribute can be set on one screen instead of one at a time.<\/li>\n<li>Settings moved out of WooCommerce &gt; Settings &gt; Products into Swatches &gt; Settings. Your saved\nsettings carry over untouched.<\/li>\n<li>Added a Settings link on the Plugins screen.<\/li>\n<li>Deleting the plugin now cleans up its own data and nothing else.<\/li>\n<\/ul>\n\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>First release: colour, image and button swatches on the single product page.<\/li>\n<li>Out-of-stock marking correct above WooCommerce's variation preload threshold.<\/li>\n<li>Out-of-stock display independent of the catalog visibility setting.<\/li>\n<\/ul>","raw_excerpt":"Show WooCommerce variations as color, image and button swatches instead of dropdowns. Sold-out options stay marked on any product.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/385084","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=385084"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/badrul007"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=385084"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=385084"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=385084"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=385084"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=385084"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=385084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}