Created
February 17, 2015 19:05
-
-
Save ChuckMac/49b8b1b48523d9a7d85c to your computer and use it in GitHub Desktop.
WooCommerce - Update Coupon Except With Note For Specific Types
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_posts p | |
INNER JOIN wp_postmeta m2 | |
ON m2.post_id = p.id | |
AND m2.meta_key = 'product_ids' | |
SET p.post_excerpt='groupon' | |
WHERE p.post_type='shop_coupon' | |
AND ( m2.meta_value='xxx' OR m2.meta_value='yyyy' ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment