Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save baiano/75fa5210fdc71c00aaf2866b3a6c36aa to your computer and use it in GitHub Desktop.
Save baiano/75fa5210fdc71c00aaf2866b3a6c36aa to your computer and use it in GitHub Desktop.
Increase price of products woocommerce
-- 10%
UPDATE wp_postmeta
SET meta_value = ROUND(meta_value * 1.10, 2)
WHERE meta_key = '_price';
UPDATE wp_postmeta
SET meta_value = ROUND(meta_value * 1.10, 2)
WHERE meta_key = '_regular_price';
UPDATE wp_postmeta
SET meta_value = ROUND(meta_value * 1.10, 2)
WHERE meta_key = '_sale_price' AND meta_value != '';
DELETE FROM `wp_options`
WHERE (`option_name` LIKE '_transient_wc_var_prices_%'
OR `option_name` LIKE '_transient_timeout_wc_var_prices_%');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment