Skip to content

Instantly share code, notes, and snippets.

@seanconklin
Last active October 13, 2020 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanconklin/a4c325a9c6f15b9fc0279a1b7ef6b1a8 to your computer and use it in GitHub Desktop.
Save seanconklin/a4c325a9c6f15b9fc0279a1b7ef6b1a8 to your computer and use it in GitHub Desktop.
SELECT * FROM wp_posts
WHERE post_type = 'shop_order'
AND post_status IN( 'wc-cancelled', 'wc-completed', 'wc-failed', 'wc-pending' )
AND post_date < CURDATE() - INTERVAL 100 DAY
ORDER BY ID DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment