woothemes/woocommerce — pull request #2221 by GeertDD (2013-01-12 15:14:46+00:00)
Title: Small optimization for showing the sorting selection

The found posts check clearly is much cheaper than the other function call. By switching the `if` conditions, if only a single product was found the `woocommerce_products_will_display()` function will not even be called.