Variable Products – Page 2

Bulk Edit Variations for WooCommerce

The plugin simplifies the process of managing variations for WooCommerce products beautifully. It allows you to filter all the variations by specific attributes and then bulk edit them in a couple of clicks.

View plugin →

How to Grey-Out Out of Stock Variations

In this tutorial, I will show you an easy way how you can grey-out out of stock variations in WooCommerce. It is actually much easier than you might think.

However, let me show an example of what we are going to achieve here:

WooCommerce grey-out out of stock variations
Two variations are out of stock here, as you can understand.

By the way, if you’re using my Simple Variation Swatches for WooCommerce plugin, then you don’t need to code anything, and this feature is already included by default for variations that are out of stock. For example, the same greyed-out radio button-type variations will look like:

grey-out radio button-type variations

Color swatches will look like this:

out of stock color variations in WooCommerce

How to Add Custom Fields to Variations in WooCommerce

Some time ago, I published a tutorial about adding custom fields to products. I covered variable products there; however, I didn’t cover adding custom fields specifically to variations of variable WooCommerce products.

Now, I decided that it is time to dive deep into custom fields for variations as well, at least because recently I’ve been adding one to my Inventory Sync for WooCommerce plugin:

Example of adding a custom field to WooCommerce variations
My plugin adds this product variation field, which allows you to decide whether to exclude this specific variation from the stock sync or not.

In this tutorial, we’ll learn how to work with WooCommerce’s custom fields for variations. Since the new WooCommerce product editor is still in development, I’ll show you examples of how to do it only for the classic product editor, which is widely in use, by the way.

How to Show Variations on the Shop Page

When you visit online store websites, you can notice that sometimes product variations (often colors, but not only) could be displayed nicely on the shop and category pages.

Something like this:

WooCommerce show color variations on shop page

But how can we do it on our store created with WooCommerce as well? The thing is that, by default, WooCommerce doesn’t have a feature that allows you to show variations on shop and category pages.

In this tutorial, I will show you how you can do that. More than that, I am going to show you multiple approaches:

Ok, let’s dive into that.

How to Show Variations as Single Products in WooCommerce

In this tutorial, I will show you an example of how you can configure your WooCommerce store to display variations as single products.

If you’re wondering how it may look on your store pages, below is a screenshot for you:

WooCommerce show variations as single products
“Hoodie – Blue, Yes” is a variation.

Get Product Variations Programmatically

Soon, you will learn three ways how you can get product variations programmatically in your code. In the first and in the second way we are simply going to use the WC_Product object (or, to be more specific, the WC_Product_Variation object). The third way is going to be a little bit more interesting – I will show how to do it via the WooCommerce REST API.

Frankly, I remember, I wanted to publish this mini-guide a long time ago, I believe I didn’t because I found an amazing explanation on another website. But guess what – today that website doesn’t exist anymore. So, here we go.

How to Select Multiple Variations in WooCommerce

If you were ever looking for a plugin that allows your WooCommerce store customers to select multiple variations at the same time, I have good news for you – you can easily do it without using any complicated plugins for WooCommerce.

The thing is that WooCommerce already has the feature you need; it is called “Group Products”. The thing is that this feature requires just a little bit of extra configuration. And that’s exactly what we’re going to do in this tutorial.

This is how it is going to look as a result:

WooCommerce select multiple variations
As you can see from the screenshot, we can select multiple variations along with a simple product as a part of a grouped product.