문제

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.

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top