Web Design, eCommerce, Hosting and SEO

Apply the price of a WooCommerce product variation to all variations

by | Jan 25, 2022 | Support, Web Design, WooCommerce | 0 comments

If you have a WooCommerce product with a lot of variations that are all the same price, entering/updating the price can be a little frustrating as you must update the price manually for each variation. For a product with three colour and size attributes this is only nine total variations, but if you could update the price for all nine with one click, surely you would? With a little bit of JavaScript added via an action hook, you can.

UPDATE: As it turns out, WooCommerce has added built-in support for the bulk editing of variations. While editing your product, after having added one or more variations, the “Add Variation” drop-down at the top of the Variations tab also includes a number of bulk edit options; you can set both regular and sale prices or modify either, increasing or decreasing by a percentage or set amount, for example.

WooCommerce Buld Price Change Variable Product

Assuming you’re not using a very old version of WooCommerce, you can use the above and ignore the rest of this article.

We’ll make use of the woocommerce_product_data_panels action hook, which is triggered after all of the panels in the “Product Data” metabox have been output, to include a few lines of JavaScript that will add a link next to the “Regular Price” field label of all variations. When clicked, this link will (after a confirmation dialog) use the price of the current variation to update all the other variations.

Related Posts

eCommerce Web Site Design, Good Information Architecture

eCommerce Web Site Design, Good Information Architecture

You might have the slickest eCommerce Web site design on the block, but if users can’t figure it and your shopping cart out, you won’t make a sale.

Over recent years, the Web has matured from a simple functionality like browsing to being able to cater to intricate processes such as end-to-end financial transactions. During this period, eCommerce website design technologies have grown more sophisticated, users have come to require a richer experience, and companies have found numerous ways to generate sales online.

read more
Web site Design in Dreamweaver, Website Design

Web site Design in Dreamweaver, Website Design

When working with Macromedia Dreamweaver MX for the first time, or on a new site for the first time, you need to define the Web site so that Dreamweaver can work with it. This process includes naming the site, placing the local files on a directory on your hard drive, and showing Dreamweaver where those files will be published on the Web. Follow these easy instructions to define a new Web site for Dreamweaver MX.

read more
Web Site Design HTML  vs Website Design Page Editors

Web Site Design HTML vs Website Design Page Editors

It seems that everyone has a web page these days. Everywhere you look there is a dot.com this and a dot.com that. Even Socks, the president’s cat, has her own page. Robert Zakon states that the number of web sites has grown from 1 billion in 1997 to almost 10 billion today (2000). So where are these pages coming from, and how are they being created?

read more


Submit a Comment

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.

Let’s Get Started

Ready To Make a Real Change? Let’s Build this Thing Together!