Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UPDATE wp_posts
- SET post_status = 'trash'
- WHERE post_type = 'shop_order'
- AND post_status IN ('wc-pending', 'wc-processing', 'wc-on-hold', 'wc-cancelled', 'wc-refunded', 'wc-failed')
- DELETE wp_posts,wp_term_relationships,wp_postmeta,wp_term_taxonomy
- FROM wp_posts
- LEFT JOIN wp_term_relationships ON ( wp_posts.ID = wp_term_relationships.object_id )
- LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
- LEFT JOIN wp_term_taxonomy ON ( wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id )
- WHERE wp_posts.post_status='trash';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement