Last active
January 31, 2017 12:47
-
-
Save TimBHowe/44f54faa1698e6f62400 to your computer and use it in GitHub Desktop.
Remove all orders from WordPress WooCommerce. This is ideally for clearing out orders on a staging/beta version of a WooCommerce site where the order information is not needed or should not be stored.
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 wp_postmeta | |
WHERE post_id IN(SELECT ID FROM wp_posts WHERE post_type = 'shop_order'); | |
DELETE FROM wp_posts WHERE post_type = 'shop_order'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment