How to Get WooCommerce Working Showing Products from the Same Category

“woocommerce query private products”
“woocommerce related products showing private ones”

woocommerce showing products


WooCommerce showing whatever it wants for related products in WordPress sidebar widget.


  1. you need to add a custom function (below)
  2. you need to update the related.php template for single product
  3. optionally comment out the tags matching so it matches directly on category and not tags

Subsequently this also fixes the problem where the related products which are private products and not published are showing when they shouldn’t be!

woocommerce showing prodcuts 2

add to theme/funtions.php


Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *