Global and local (custom) attributes in Woocommerce

Many Woocommerce plugins (including mine) can only work with global attributes. I will try in general, without going into technical details, to explain what the difference is.
How to create a global attribute

The global attribute Woocommerce is created through "Products" - "Attributes", the button "Add attribute".

Creating a global attribute

How to add a global attribute to the item card

Jump to the Attributes map element. Open "Custom product attribute", select, select the attribute you need from the list, click "Add". Attribute values ​​can be set either using the "Add New" button or from the drop-down list that appears when you click on the "Select terms" field.

add global and local attributes in woocommerce

How to create a local attribute and add it to the product

A local attribute is created and added directly from the item card. Go to the Attributes map element. When choosing, you no longer need to drop-down list, because the element "Custom product attribute" that we need is initially selected. Fill in the "Name" and "Value" fields. No more drop down lists.

"Manufacturer" is not equal to "Manufacturer"

General error. Suppose a user has assigned a local attribute “Manufacturer” to all his products. After that, he installed my plugin. In the plugin settings, in the drop-down lists, he does not see this attribute. Next, the user enters "Products" - "Attributes" and creates an already global attribute "Manufacturer". Goes to the settings of the plugin, selects the attribute that appears in the list, saves the settings and expects the attribute to be inserted into the XML feed.

local (custom) attribute

But he WILL NOT BE MADE! The global attribute "Manufacturer" is not yet registered in the product. First, the user must add a global attribute "Manufacturer" to the item card.

How to externally distinguish a global attribute from a local (custom) one?

global and local attributes in woocommerce

Very simple. The name of the global attribute cannot be changed from the list of products, and the values ​​are written in the form of "islands".

Рейтинг: 5

2023-10-24 / / 0 комментариев / Документация