I’ve created seven products with a tag in common i.e. ‘xyz’.
Now go to product page from front end. Initially it will display only two related products:
Now add the following lines of code at the end of your theme’s functions.php file:
function woocommerce_output_related_products() { woocommerce_related_products(array('posts_per_page' => 6, 'columns' => 2, 'orderby' => 'rand')); }
Go to product page again and you’ll see 6 related products.
CHEER SJ