To import global attributes you need this add-on to import variable products you need this add-on. Global attributes are additional data that is stored similar as categories. Beside global attributes, attributes are also used to manage variations and attributes are also used a lot to add filters using the widgets shipped with woocommerce.
You can basically use the same syntax to import attributes as used for importing categories. If you want to set up a product with these attributes:
this will be your setup of your header:
And this of the values:
In the front-end this would result into this:
In the wordpress admin the size attribute would would look like this:
The attribute product tab would look like this:
To control the visibility you can add ->0 to make uncheck the visibility checkbox. So
color->1|size->0 is the same as
color|size->0 and it will make color visible on the product page and the size not visible.
If you enable merging, the attributes will be added to the existing ones. If you disable merging, all attributes will be replaced. Sometimes you want to have merging enabled but still override you attributes. This can be accomplished with the setting: Always clear attributes. If you enable this, attribute values will always be cleared before the actual import.