When your WooCommerce store has no published products the shop page will not display anything. A message “No products were found matching your selection” will show instead. The same applies to empty categories.
So, how do we hide this notice? Thankfully, and once again, one line of PHP is sufficient to achieve the result! Enjoy 🙂
PHP snippet: Hide “No products were found matching your selection” @ WooCommerce Shop Page and/or Category Pages
/** * @snippet Remove "No products were found matching your selection" @ WooCommerce Loop Pages * @how-to Get CustomizeWoo.com FREE * @sourcecode https://businessbloomer.com/?p=114079 * @author Rodolfo Melogli * @compatible WooCommerce 3.5.4 * @donate $9 https://businessbloomer.com/bloomer-armada/ */ remove_action( 'woocommerce_no_products_found', 'wc_no_products_found' );