Answer the question
In order to leave comments, you need to log in
How to remove all products from a category in Wocommerce?
There are about 40,000 products in the category. Because they were filled in with errors and several times, some were duplicated. It is necessary to delete all products from this category and upload again. Deleting 100 pieces is unrealistically long. Plugins for removal are also cut off after some time, due to timeouts.
I read about the method of deleting through the database, but everywhere it is written how to delete all products from the database.
Is it possible to remove only products from a certain category?
Answer the question
In order to leave comments, you need to log in
You can, you need not be too lazy and climb to see where woocommerce stores the category of the post in the database, then make a request for the type of post + category, then make a "slap". Google mysql queries.
The second option is to use the standard functionality of the vp and not go into the database if you suddenly do not master it. In order not to hang from the timeout, just make an ajax request that will receive a list of all the necessary records. Then split it into separate records with a script and send these requests to the server with a timeout in a loop, also via ajax. Not fast, but nothing hangs.
In general, briefly summing up the answer to your question - you can)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question