Increase all product prices by some percentage Woocommerce

I have around 4000 products in woocommerce and there prices has been set,

Now I want to increase the prices of all products by some percentage.

Read More

Like I have a product price say 100 and I want to add 40% in it to make 140 .

I need to do this for all 4000 products

Please suggest to me how can I achieve this.

Related posts

Leave a Reply

1 comment

  1. Before proceeding please take a backup of the database and run the following query using PHPMyAdmin or some other similar means.

    To update regular price

    update wp_postmeta set meta_value = meta_value * 1.40 where meta_key='_regular_price'

    To update sale price, run the same query just change the meta_key to _sale_price