WooCommerce category shows no products but thinks that there are products

Problem:

WooCommerce category shows no products while it thinks there are products related to it.

For a WordPress website with WooCommerce webshop, I get the message that some categories in the webshop shows the error message that no products were found.

This is strange because the product overview pages are set to show only categories with at least 1 product. I visit the webshop myself and can reproduce the problem.

Advertentie:

In the wp-admin environment, I go to the list of categories to check how many products should be in the categories. For one of the problem categories, I see the counter is at 5. But as soon as I click on the number 5 to show the related products I get a empty list. So both front- and back-end consistently indicate that there are no products in this category.

Since the category counter is not set to 0 the category does show up on the front end.

Solution:

Apparently for some categories the product numbers were no longer correct. By resetting these categories the counters went to 0. As a result, not all categories were shown at the frontend anymore.

Follow this step-by-step plan to reset the counters:

  1. Log into  the wp-admin environment
  2. Add a new product and save it as a concept
  3. Check all categories
  4. Publish the product
  5. For the checked categories, the number of products are recounted
  6. Delete the product

> View more blogs about WooCommerce in Dutch

Tested on:

WordPress 6.8 met WooCommerce 9.8.1

Advertentie:

Laat een reactie achter

Je e-mailadres zal niet worden gepubliceerd. vereiste velden zijn gemarkeerd met *

Deze site gebruikt Akismet om spam te verminderen. Bekijk hoe je reactie gegevens worden verwerkt.