Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. UPDATE wp_posts
  2. SET post_status = 'trash'
  3. WHERE post_type = 'shop_order'
  4. AND post_status IN ('wc-pending', 'wc-processing', 'wc-on-hold', 'wc-cancelled', 'wc-refunded', 'wc-failed')
  5.  
  6. DELETE wp_posts,wp_term_relationships,wp_postmeta,wp_term_taxonomy
  7. FROM wp_posts
  8. LEFT JOIN wp_term_relationships ON ( wp_posts.ID = wp_term_relationships.object_id )
  9. LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
  10. LEFT JOIN wp_term_taxonomy ON ( wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id )
  11. WHERE wp_posts.post_status='trash';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement