It is cached. It will refresh next time a product is updated.
@mikejolley
I am not sure I understand.
The products have already been deleted previously. Did you mean the reports will not show deleted products once another active product is updated? If yes, that is not the case. The Out of Stock reports always contain products that have been previously deleted.
Am I describing this clearly or am I confusing you?
Save a product. See if the reports update.
If not, are the products in trash or deleted properly?
I have the same problem. Even after control if trashed products is empty, saving new products and deleting cachefiles there are still old productvariations appearing in the woocommerce status dashboard.
Also I see that the products who are really out of stock are not in that list.
Stockstatus in the product admin list is correct, but I can not filter in that list on status.
Woocommerce version: 2.6.3
Theme: Mystile 1.3.12
WooFramework 6.2.5
Hope you have a solution for us.
Happy greetings,
Emilia
I wonder if the variations are still there, even with the parent deleted. It should delete them for you, but you can clear those out with https://gist.github.com/pmgarman/6135967
Yes those parent products were also deleted (half year ago). They do not appear in the list only some of their variations.
I will try out with the code you pointed to. Do not know exactly where to place that code but I will figure that out. 😉
Thanks for the help!
@mike. I have placed the both files via ftp in my folder mysqladmin but nothing changes. Did I forget something or placed it wrong?
@mike
I will try the sql queries and report back the results.
Oh, that is code that you need to run in MySQL / phpMyAdmin.
This could maybe work: https://wordpress.org/plugins/sql-executioner/. Definitively recommend backing up your site and database first before running these queries though.
I am pleased to report success!!
When I ran the SELECT query, I found 841 rows of such orphaned variations. Once I ran the DELETE query, they were all gone.
@icaleb, I did backup my database before running the queries.
@mikejolley, how do we get WooCommerce core code to clean out these orphaned variations?
Thanks
Amit
Hi, thanks to Caleb I understood how to run the sql queries. Happy with this knowledge.
However I get the message: Table ‘stips_5603980b51.wp_posts’ doesn’t exist
So still no results until now. I guess… wp_posts has to be named differently how can I find out how it has to be named?
I encounter the same problem, yet after executing the SQL code I get a message “table wp_posts doesn’t exist”
Got it! simply replace “wp” in “wp_posts” with the name that was given to your dbase.
Worked perfectly for me. Don’t forget to backup your dbase.