Skip to content

Instantly share code, notes, and snippets.

@isuke01
Last active May 14, 2019 10:06
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 isuke01/ec595257e2312d94ce6d20489d17a760 to your computer and use it in GitHub Desktop.
Save isuke01/ec595257e2312d94ce6d20489d17a760 to your computer and use it in GitHub Desktop.
Woo incresce all prices by 0.16%
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_regular_price' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_sale_price' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_price' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_regular_price_tmp' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_sale_price_tmp' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_price_tmp' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_min_variation_price' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_max_variation_price' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_min_variation_regular_price' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_max_variation_regular_price' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_min_variation_sale_price' AND meta_value != '';
UPDATE ln_postmeta SET meta_value = ROUND(meta_value*1.16,2) WHERE meta_key = '_max_variation_sale_price' AND meta_value != '';
@isuke01
Copy link
Author

isuke01 commented May 14, 2019

Update for round numbers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment