How to remove bulk products by ID from woocomarce using SQL?
-
I have tried using this query that I found for deleting All products, have changed it a bit. But it deleted all attributes of existing products.
DELETE relations.*, taxes.*, terms.* FROM wp_term_relationships AS relations INNER JOIN wp_term_taxonomy AS taxes ON relations.term_taxonomy_id=taxes.term_taxonomy_id INNER JOIN wp_terms AS terms ON taxes.term_id=terms.term_id WHERE object_id IN (ID1, ID2 ... 500 more IDs); DELETE FROM wp_postmeta WHERE post_id IN ( (ID1, ID2 ... 500 more IDs); DELETE FROM wp_posts WHERE <code>ID</code> IN (ID1, ID2 ... 500 more IDs);
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to remove bulk products by ID from woocomarce using SQL?’ is closed to new replies.