By default WooCommerce allows you to list products by attribute using this shortcode: [product_attribute attribute=’color’ filter=’black’], but this shortcode accepts only one single value for your attribute. That means that this shortcode [product_attribute attribute=’color’ filter=’black,red,white’] will not return anything.
That’s why i coded this small plugin that will allow you to set as many values for your attribute as you want. To use, simply place this shortcode:
[woo_products_by_attributes attribute=”colour” values=”red,black” per_page=”5″]
Remember, you can define only one attributes, but this attribute can have as many values as you want!