The code includes 2 custom WooCommerce product loops which you can display in any position on your single products page. Only unique products are displayed removing duplicates including the current product the loops are displayed on. Out of stock products are also removed.
In this example, the 1st loop is shown before the single product and the 2nd after the single product.
There’s only 1 step :
Copy & paste the PHP code ( excluding the opening PHP tag ) from the functions.php file to the end of your child themes functions file or custom functionality plugin.