As discussed in the full guide about adding products in WooCommerce, Attributes can be used for important product distinctions such as color or size as well as providing more technical information about your products and setting variables. In this article, you'll learn more about how to use product attributes in WooCommerce.
Attributes function similarly to Categories in WordPress. However, in this case Attributes are applied to Products as Cateogories are assigned to Posts or Pages in WordPress.
Using Predefined Attributes or Custom Attributes, How to Decide?
WooCommerce allows you to set global attributes that can be applied later to any new or existing products. For example, a common predefined attribute for a clothing store would be sizes. Instead of setting a size attribute for each new product, you can have Size predefined as a repeating attribute.
Conversely, custom attributes can be created as needed. For example, if you are selling "Smasho" available in three varieties of "Heat" â€” regular, hot, and boiling â€” then a custom, non-repeating attribute will meet your needs. Of course, setting a custom "Heat" attribute assumes that "Smasho" is the only product available with a "Heat" attribute.
If you eventually have many products requiring the same custom attribute then you may want to consider predefining the repeating attribute.
How to Add Predefined Attributes to Your Store
In your WordPress admin panel find the Products tab and choose Attributes below.
You will see the Add New Attribute interface.
- Under Name fill in the name of the attribute
- For Type you can choose Select or Text. Select will allow pre-configured values to display automatically in a dropdown menu. Text will allow you to manually enter values later.
- If you chose Select for Type you may now select your attribute to configure the attribute values. You will notice the attribute you created in the table at the top right of the Add New Attribute window.Click Add Attribute
To add the attribute values:
- Choose your new attribute at the top right
- Under Add New ___ name the value
- Click Add New ___ at the bottom
How to Add Custom Attributes to Individual Products
As discussed above, you may find it preferable to assign a custom attribute to a unique product as needed rather than going through the above-described procedure of setting pre-configured attributes.
For example, your store may sell a variety of different items that do not share common attributes. For those types of products you can set custom attributes in the Product Data menu.
- Go to your WordPress admin panel
- Select a product or Add New Product
- Scroll down to the Product Data section
- Click Attributes
- The dropdown menu for "Custom product attribute" is already selected
- Click Add
- Name your Attribute and add your values. Make sure to separate each value with a pipe (|). For example: Small | Medium | Large
- Click Save Attributes