Home » WooCommerce: Hide “No products were found matching your selection”

WooCommerce: Hide “No products were found matching your selection”

by adminkys

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 or when you decide to completely hide the shop page products for some reason, especially for custom built layouts.

So, how do we hide this notice? Thankfully, and once again, one line of PHP is sufficient to achieve the result! Enjoy 🙂

Hiding the “No products were found matching your selection” on the Shop / Category pages

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"
* @how-to        Get tutoraspire.com FREE
* @author        Tutor Aspire
* @compatible    WooCommerce 6
* @donate $9     https://www.tutoraspire.com
*/

remove_action( 'woocommerce_no_products_found', 'wc_no_products_found' );

You may also like