Shop / Product - How to enable product attribute swatches.
First please install and activate WooCommerce Variation Swatches plugin in Appearance -> Install Plugins section.
Then go to the Products -> Attributes section and select attribute for edit and select swatch type for it (Color, for example)
Then configure terms for current attribute.
How to enable product attribute on product in shop catalog?
This feature only applies to variable products. Go to Appearance > Customize > WooCommerce > Shop Catalog > Product Attribute to select the attribute you want to show on.
You can change the attribute for a product you want. Edit a Variable product > Product Attribute tab and select the attribute you want to show.
How to show attribute swatches widget on sidebar?
Go to the Appearance -> Widgets section and add Barberry Attributes Filter widget