Created
June 28, 2012 14:38
-
-
Save byronrode/3011720 to your computer and use it in GitHub Desktop.
Update product variations using MySQL.
This file contains hidden or 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
UPDATE wp_postmeta as pm, wp_posts as p | |
SET pm.meta_value = 500 /* <new price> */ | |
WHERE pm.post_id = p.ID | |
AND p.post_type = 'product_variation' | |
AND pm.meta_key = '_price' | |
AND pm.meta_value = 1000 /* <old price> */ | |
AND p.post_status = 'publish'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment