Managing Product Attributes

Attributes are mostly useful for searching and filtering products and hence by giving attributes to products, users can quickly filter them and narrow their search on your shop.

Generally speaking, WooCommerce allows you to set global attributes that can be applied later to any new or existing product(s).

As an example, if you are in a fashion or clothing business, you might have a different size chart per product variation and could make an attribute for size accordingly. Doing this will enable your customers who are looking for a medium size clothes to quickly find the relevant t-shirt, hoodie, or pants with medium size attribute.

Attributes are often get confused with variations, but in fact, they are entirely different. Variations are not typically used for searching or filtering products and, the original purpose of defining them is to allow users to choose different options of a product to purchase.

Attributes and variations often rely on each other to work as expected and in fact, variations are defined based on attributes, therefore, creating attributes is an essential first step before creating variations or any variable product.

Add or Edit Product Attributes

Attributes can be managed by navigating to the Products » Attributes screen and similar to categories on your products, you can add, delete, and edit product attributes as well.

Managing WooCommerce product attributes
  1. Login to the your WordPress Dashboard.

  2. Click the Products tab.

  3. Click the Attributes sub-tab.

  4. Enter a Name.

  5. Optionally, enter a Slug. This is the URL-friendly version of the name.

  6. Optionally, Enable Archives. If enabled, you can view a page with all products having this attribute.

  7. Optionally, alter the Default sort order.

    • Name — Sorts alphabetically.

    • Name (numeric) — Sorts based on numerical value.

    • Term ID — Sort by generated term ID.

    • Custom ordering — You can drag and drop the terms in this attribute to determine the sort order of the terms on the front-end shop product pages.

  8. Optionally, specify type of the swatch to use for this attribute.

    • Image — Display a preview of each variation’s actual appearance.

    • Color — Display product’s color options in one place.

    • Text — Display product attributes as clickable text-based options.

  9. Click Add attribute button to save your new attribute.

  10. The attribute will be added in the table on the right, but without values.

Attribute Archives

As an example, in case you have this option enabled, and black is one of the options under color, you can add https://www.example.com/pa_color/black to your menu to only display black clothing – pa stands for product attribute.

Attribute Swatches Fieldset

Managing attribute swatches fieldset
  • Shape — Shape of the swatches to be displayed on archive and single product pages.

    • Round

    • Square

  • Size — Size of your swatches on the front-end.

    • Width in pixels ― Default 30px.

    • Height in pixels ― Default 30px.

  • Enable tooltips ― Displays a tooltip to specify extra information when the user moves the mouse pointer over a variation element.

  • Display in archives ― Displays available swatches of this attribute in the catalog listing (archive) for each product.

  • Append to filters ― Append this attribute to the WooCommerce layered navigation filter widget.

  • Groups ― Enables you to split attribute terms into different groups to provide a better user experience.

Filter Product Attributes By Widget

Filter Products by Attribute is a powerful widget that lets users drill-down through your catalog of products via attributes, effectively helping them find what they’re looking for quickly.

WooCommerce Filter Products by Attribute widget

Add the widget to your widgetized area. Then choose an attribute to filter by and whether you want users to filter by AND or OR query types.

Filter product attributes by widget
  • AND ― If a user selects two attributes, only products which match both attributes will be returned.

  • OR ― If a user selects two attributes, products which match either attribute will be returned.

Configuring The Terms For Attribute

Once you have created an attribute, you would be able to add variations of it.

Configuring the terms for a product attribute

Select the Configure terms text to add attribute values.

Managing terms for an existing product attribute
  1. Enter a Name.

  2. Optionally, enter a Slug. This is the URL-friendly version of the name.

  3. Optionally, enter a Description.

  4. Depending on your attribute swatch type you may find an extra option to define color or image of the new term.

    • Color — Choose any color using colorpicker or type in the HEX value for the color.

    • Image — Upload an image or thumbnail.

  5. Click Add new [attribute] button to save your new term.

Table of Terms

This table lists all of your product attribute terms by row and contains the following columns:

  • [ ] — A checkbox that when clicked (checked), selects that particular term to be deleted with a bulk action.

  • Swatch — Color or thumbnail of the swatch.

  • Group — Group label or name.

  • Name — The name of the term.

  • Description – Terms may have an optional description.

  • Slug — The slug of a term. Usually in lower case letters.

  • Count — The number of products which are members of the term.

Deleting a term will remove it from all products and variations to which it has been assigned. Recreating a term will not automatically assign it back to products.

Search Through Terms

Above the table, to the right, is a search box where you can enter a word, or series of words, and click the Search [attribute] button to search and display all the Terms meeting your search words.

Quick Edit

The following fields can be modified via the Quick Edit section:

  1. Term name — To reiterate, the term name must be unique.

  2. Term slug — Again, the term slug also must be unique.

Screen Options

The Screen Options allow you to choose which columns are displayed, or not displayed, in the underlying Table. Clicking on the screen options tab will show a list of columns with a check-box next to each column.

Also, the number of terms to display in the Table of Terms can be set and modified from here.

Sorting Product Categories

Terms can also be reordered or sorted by dragging and dropping.

Sorting product attribute terms by dragging and dropping

This order is used by default on the front end whenever the terms are listed. This includes both widgets and the single product view on your shop.

Assigning Global Product Attributes

While adding a new or editing any existing variable product via Products » Add Product, you can select one or multiple attribute by following the steps below:

Adding product attributes to use for variations
  1. Login to your WordPress Dashboard.

  2. Click the Products tab.

  3. Click the Add New sub-tab or edit an existing one.

  4. Scroll down to the Product Data section.

  5. Select the Attributes tab.

  6. From this tab you would be able to choose any of the global attributes that you’ve created in the drop-down menu.

  7. Select one from the drop-down and Add.

  8. Choose Select all to add all attributes to the variable product (if applicable).

  9. Check the Used for variations checkbox to notify WooCommerce that these terms will be used for variations later.

  10. Click Save attributes button.

Adding Custom Attributes To A Product

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.

Once the attributes you need are all created, you can assign them to each product from the product data section.

Adding custom product attributes to individual product
  1. Login to your WordPress Dashboard.

  2. Click the Products tab.

  3. Click the Add New sub-tab or edit an existing one.

  4. Scroll down to the Product Data section.

  5. Select the Attributes tab.

  6. Select Custom product attribute from the drop-down menu and click Add.

  7. Name the attribute (e.g. Size)

  8. Set values separated by a vertical pipe (e.g. small | medium | large)

  9. Check the Used for variations checkbox to notify WooCommerce that these terms will be used for variations later.

  10. Click Save attributes button.

Adding A Product Variation

Adding product variations
  1. Scroll down to the Product Data section.

  2. Select the Variations tab.

  3. Select Create variations from all attributes from the drop-down menu, and click Go.

  4. To change additional data, click the triangle icon to expand the variation.

  5. Edit any available data. The only required field is Regular Price.

  6. Click Save changes button.