This question is very similar to the one below however it requires a different solution.
I'm using the plugin Related Posts Thumbnails but i'm using the template tag in my template file to display related products.
<?php get_related_posts_thumbnails(); ?>
I've got this contained inside of a div with a title so the output looks a bit better. However if there isn't any related products i need it to hide the div otherwise it just displays an empty area.
This is the code i'm using.
<div id="relatedproducts"> <h1>Related Products</h1> <?php get_related_posts_thumbnails(); ?></div>
Is it possible to not show this div if the function returns no related products?