Skip to content

Instantly share code, notes, and snippets.


movielady movielady

  • South Dakota, USA
View GitHub Profile
movielady / woocommerce-hide-empty-categores.php
Created Dec 30, 2020 — forked from cklosowski/woocommerce-hide-empty-categores.php
Here's a quick function that will look at the categories in the product list, find the products in the category, and if none of the products are visible, it will not display the category in the widget:
View woocommerce-hide-empty-categores.php
Plugin Name: WooCommerce - Exclude empty categories from widget
Plugin URI:
Description: Excludes categories with no visible products from the WooCommerce category list
Version: 0.1
Author: Chris Klosowski
Author URI: