Skip to content

Instantly share code, notes, and snippets.

@raftaar1191
Created December 17, 2019 11:17
Show Gist options
  • Save raftaar1191/c8268f699d27d274f3b55e9b5a0000d7 to your computer and use it in GitHub Desktop.
Save raftaar1191/c8268f699d27d274f3b55e9b5a0000d7 to your computer and use it in GitHub Desktop.
Delete all the shop_subscription, Licences and Orders and Users
DELETE FROM wp_postmeta where post_id IN (SELECT ID from wp_posts where post_type = 'shop_subscription' );
DELETE FROM wp_comments where comment_post_ID IN (SELECT ID from wp_posts where post_type = 'shop_subscription' );
DELETE from wp_posts where post_type = 'shop_subscription'
TRUNCATE TABLE wp_woocommerce_software_licenses;
DELETE FROM wp_postmeta where post_id IN (SELECT ID from wp_posts where post_type = 'shop_order' );
DELETE FROM wp_comments where comment_post_ID IN (SELECT ID from wp_posts where post_type = 'shop_order' );
DELETE from wp_posts where post_type = 'shop_order'
DELETE FROM wp_usermeta where user_id IN (SELECT ID from wp_users where user_email NOT LIKE '%@buddyboss.com' );
DELETE from wp_users where user_email NOT LIKE '%@buddyboss.com';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment