• Resolved vaidotask

    (@vaidotask)


    After using third party import plugin WooCommerce products got into “broken” state, where categories display incorrect totals, product listing has missing products (total shows 12, but actually only 4 products are displayed).
    Running “Clear transients”, “Recount terms” from Status -> Tools didn’t fix the problem.
    Is there any automated way to force WooCommerce to update product counts?
    Currently only way to fix product issues is going into product, setting product stock to 0, saving and updating to correct count. Problem is, that shop has over 1000 products.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @vaidotask,

    Have you tried using the product lookup table regeneration tool? Go to WooCommerce > Status > Tools and click on this button.

    regenerate table
    (Link to screenshot: https://cld.wthms.co/6l9kzx)

    The lookup table is there to speed up access to product data in the database. It’s possible that the data wasn’t copied over successfully. Try running this and see if it helps out.

    Let us know how it goes,

    Thread Starter vaidotask

    (@vaidotask)

    Yes, I’ve tried every option on Tools page, but none of them worked. Problem is that products are missing term relations data for visibility, and none of the tools fixes that.

    Hi @vaidotask,

    Sorry, that didn’t fix this for you. Let me make sure I’m following you here. You said the category page shows a total of 12 products, but only four are displayed. Should the category have four, twelve or another number? If you visit one of the products that’s left out, does it show the correct category?

    You may be able to fix this by running a CSV export/import with the built-in tool. Export the products, correct the CSV for any errors you see and then import again.

    Otherwise you may need to roll back before the original import was made with a backup.

    Thread Starter vaidotask

    (@vaidotask)

    Label before product list displays “Total 12 items”, but only 4 products actually are displayed on page.
    I figured out that SQL query for total count returns incorrect results, as item visibility term relations are missing.
    Doing clean import should solve the problem, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to recount products in categories’ is closed to new replies.