Created
May 18, 2018 17:18
-
-
Save tallesairan/2a1c4078cbce8e6dfdcd61d001769644 to your computer and use it in GitHub Desktop.
Delete all orders from WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM wpcs_woocommerce_order_itemmeta; | |
DELETE FROM wpcs_woocommerce_order_items; | |
DELETE FROM wpcs_comments WHERE comment_type = 'order_note'; | |
DELETE FROM wpcs_postmeta WHERE post_id IN ( SELECT ID FROM wpcs_posts WHERE post_type = 'shop_order' ); | |
DELETE FROM wpcs_posts WHERE post_type = 'shop_order'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment