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 product’s attributes are added to the product level.
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.
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.
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.
Hover over Tools
Click on Transform WC attributes
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.
When it is processing...
This is what the attributes look like after the script has been completed.
The variations’ attributes are automatically changed to global attributes. Which means you don't need to correct these values.
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.