Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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