Created
October 28, 2020 18:35
-
-
Save bmakowski/e2ff8437b4fc838e83dffaec86a1b158 to your computer and use it in GitHub Desktop.
clear all orders, subscriptions and customers
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 | |
p,pm | |
from wp_posts p | |
join wp_postmeta pm on pm.post_id = p.id | |
where p.post_type = 'shop_order'; | |
delete | |
p,pm | |
from wp_posts p | |
join wp_postmeta pm on pm.post_id = p.id | |
where p.post_type = 'shop_subscription'; | |
delete | |
u,um | |
from wp_users u | |
join wp_usermeta um on um.user_id = u.id | |
where um.meta_key = 'wp_user_level' and um.meta_value = 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment