Blog

WooCommerce converting product attributes from product to global level

By:
on:

Ever been in a situation where you can't filter WooCommerce products because they contain attributes on the product level and not on the global level? Well, we experienced this frustration recently, which made us think of a way to fix this problem. Anyone who shares this frustration, don't worry; your problem will be solved at the end of this blogpost thanks to our amazing plugin “WooCommerce Switch Attributes To Global”  😉

The problem

The product’s attributes are added to the product level.

Example: The attributes are added with pipes inbetween.
Example: The attributes are added with pipes in-between.

GitHub

Before we continue explaining the solution, I would like to share the link to the GitHub Repository. “WooCommerce Switch Attributes To Global” is the plugin that will help convert attributes from the product to the global level.

Plugin installation

The installation is straightforward like other WordPress plugins. Upload the zip through the plugins page or upload the unpacked version of the plugin to the wp-content/plugins directory using FTP.

Transforming page

Once the plugin is activated, you will see the "Transform WC attributes" page below the Tools menu. When you click on the “Start script” button, it will run AJAX script to update the products one by one.

button to go to transforming page.

Hover over Tools

Click on Transform WC attributes

The solution

Click on "Start script" to start a process of converting the attributes from the product level to the global level. Besides that, it will also set the post meta variable of the variation to global.

transform script page
Transform script page

When it is processing...

When the script is processing
When the script is processing

This is what the attributes look like after the script has been completed.

Product Attributes are changed into global attributes
WooCommerce global attributes page
WooCommerce global attributes page

The variations’ attributes are automatically changed to global attributes. Which means you don't need to correct these values.

Variations attributes are changed to global
Variations attributes are changed to global

Conclusion

By running the transforming script, the product level attributes will no longer pose a problem. You can easily change those to global attributes.

Now it’s simple to filter the products based on the global attributes.

KOEN IS HAPPY TO INTRODUCE APPSALOON
APPSALOON BV
Bampslaan 21 box 3.01
3500 Hasselt
Belgium
VAT: BE08 4029 5063
2021 © AppSaloon All Rights Reserved
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram