how to delete completed orders in woocommerce using a my sql query

后端 未结 5 878
慢半拍i
慢半拍i 2021-01-03 08:02

I want to delete completed all orders in woocommerce by using a single my sql query. Because, I\'m having a problem with my WordPress Dashboard

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-03 08:45

    Woocommerce orders are stored in the post table, postmeta table, woocommerce_order_items, and woocommerce_order_itemmeta tables. Various parts of an order are stored in different tables. addition to that the order status is managed through the taxonomies which stores the order status list. Anyone who is/will be writing this query have to write at least 5-6 queries minimum or single large join query.

    So, my suggestion to you should uninstall WooCoommerce, if you don't have much larger product setup. To do this you can follow this link which will delete the data

提交回复
热议问题