Product attributes show up in admin panel but not anywhere in the database

I have a WooCommerce site on which I had a person work on with a custom products importer. The importer was supposed to loop through a csv file, add products, prices, stock etc, as well as search through a string of attributes that looked something like:

“Name of field: Field Data – Another field: Data – Third field: More data -” etc.

It should then add the “name” of the field (such as “Another field”) as a product attribute, and then the field data as, well, field data for that attribute.

However, instead of checking whether or not the field existed in the database, he made the mistake of adding identical fields for each product in the CSV (around 2500 products).

I now have hundreds of duplicate attributes in my WC product attributes list.

Removing these manually would take days, since a page reload happens every time you click Remove.

So – I figured I would go into phpMyAdmin to remove them in bulk from there.

I found the table with attributes (wp_woocommerce_attribute_taxonomies, as well as wp_terms and wp_term_taxonomy). As I suspected here was a boatload of attributes. Such as “brand-name”, “wr” times hundreds. I decide to start with “wr”. I search the table for “wr” and I bulk-delete everything that matches (which I am completely sure was only wr attribute fields and nothing else).

After I deleted all of the “wr” attributes – the whole table is blank. The data I saw before (brand-name, case, material etc) that I KNOW was there before I removed the wr-attributes, are suddenly gone.

I have now searched every single table in the database for “case” for example, but it can’t be found anywhere. However, the duplicate attributes STILL show up in the admin panel.

What do I do?

Read more here:: Product attributes show up in admin panel but not anywhere in the database

Leave a Reply

Your email address will not be published. Required fields are marked *