WooCommerce: How to Edit Product Prices in Bulk?

I’m pretty sure that during one of those Black Friday sales all you wanted to do was to apply a bulk discount to your WooCommerce products without having to generate a coupon code.

Let’s not forget that despite coupons are trackable and you can assess your marketing efforts with their usage statistics, requiring the user to take one additional step at checkout (entering the correct coupon code) reduces your sales conversion rate (the same applies with useless checkout fields by the way – less work to do, higher conversion rate).

In today’s post, we’ll see what are the 3 options I recommend in order to apply bulk store discounts. It pretty much depends on your product types (simple vs variable for example) and whether you want to do this via the settings or with a little bit of PHP.

1. Product Price Bulk Editing (WordPress Dashboard)

This is the easiest solution. You can just do this from the “Products” admin page of your WordPress dashboard.

Steps:

  1. Go to the “Products” admin page
  2. Tick all the products you want to edit the sale price for
  3. Click on Bulk Actions > Edit
  4. Select “Change Sale Price to:”
  5. Choose “Percentage off of regular price”
  6. Enter e.g. 30%
  7. Update

The problem is that this method only works for simple products, and it won’t change the pricing of variable, grouped or any product with price ranges (min – max).

2. Product Price Bulk Editing (Premium Plugins)

In case your store has many variable products (for example, a fashion WooCommerce store – where each product comes in different sizes, colors, styles…), then the above method won’t work for you.

Thankfully, there is a plugin for that: YITH WooCommerce Bulk Product Editing

With a single click, you can automatically apply the same bulk discount to variable and simple products. Or, you can filter by category or do an advanced search so you can find the correct products to edit:

The advanced product filter provided by YITH plugin

3. Programmatically Apply a Coupon (PHP Snippet)

This method is my favorite.

It requires a little PHP that must be placed in your child theme’s functions.php (here’s a free video lesson in case you don’t know how to override WooCommerce the right way).

In this case, the coupon will be automatically applied to the cart once a user goes to the WooCommerce Cart page.

First, you need to create the coupon from WordPress Dashboard > WooCommerce > Coupons. Make sure to set the coupon code with an overall % cart discount (and not a fixed amount), then write down the coupon code as you will need it for the PHP snippet.

After this is done, simply use this snippet: https://businessbloomer.com/woocommerce-apply-coupon-programmatically-product-cart/ (and exactly the “Apply a Coupon Programmatically for ALL Products” version – it’s the second snippet).

Enjoy πŸ™‚

Rodolfo Melogli

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as a WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

10 thoughts on “WooCommerce: How to Edit Product Prices in Bulk?

  1. Ciao Rodolfo,
    I see the plugin you recommend has had its last update on May ’18! Do you reckon it is safe to install on a WordPress 5.X.X version?

  2. Amazing work around for a sitewide discount, just what I was looking for!

    Any chance we can make this temporary? Like a countdown?

    1. Thank you Gina πŸ™‚ If you’re talking about the first solution, in each product you can also define the “sale price dates”. However, I don’t know if you can set that up via bulk editing

  3. hi I do not see this code

    After this is done, simply use this snippet: https://businessbloomer.com/woocommerce-apply-coupon-programmatically-product-cart/ (and exactly the β€œApply a Coupon Programmatically for ALL Products” version – it’s the second snippet).

    page links to coupon for 1 product only?

    1. Hey Lottie, thanks for your comment! You’re right – I’ve now re-added that snippet πŸ™‚

  4. Hey Rodolfo πŸ™‚
    Nice to see you again

    Would you know a plugin which allows to apply a discount for 10 pieces of the same product?
    For example, if I seel socks. One sock would cost $12. But I wanted to offer 10 socks for $100, on the product page. The customer would see an offer, just below the product price:
    “buy 10 for $100”

    thank you, best wishes πŸ™‚

    1. Hello Martyna, good to hear from you πŸ™‚ Yes, I recommend the following plugins:

      Hope this helps! πŸ™‚

  5. Hey Rodolfo,
    thanks once again for sharing all these awesome tips.
    Is there an easy way to modify the 3rd variant to remove the coupon if “remove coupon” link is clicked? I love how this works, but would prefer to be able to remove the coupon if people want to manually use a different one.

    Thanks!

    1. Hey Miroslav, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

Questions? Feedback? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between: [php]code_here[/php]. Failure to complying with this (as well as going off topic) will result in comment deletion. You should expect a reply in about a week - this is a popular blog but I need to get paid work done first. Please consider joining #BloomerArmada to ask me 1-to-1 WooCommerce questions. Thank you :)

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.