Created
March 9, 2018 16:54
-
-
Save woogists/c882884b0ef42b0f9adde7d27b6e68af to your computer and use it in GitHub Desktop.
[Bulk Stock Management] Fix the display of variations which have been deleted SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE o FROM `wp_posts` o | |
LEFT OUTER JOIN `wp_posts` r | |
ON o.post_parent = r.ID | |
WHERE r.id IS null AND o.post_type = 'product_variation' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment