We're going back through an existing site and adding attributes to the products, but we need a way to verify that every product has gotten them.

Is there any method or function call that will give me a list of all products missing the attribute "color"?

1 Answer 1


I've had to do something similar recently, create a list of all attributes by product and product variation.

I used SQL to produce the list. It's a bit basic and I'm sure could be improved easily.

SELECT  wp_posts.id,wp_woocommerce_attribute_taxonomies.attribute_id, wp_woocommerce_attribute_taxonomies.attribute_name,wp_woocommerce_attribute_taxonomies.attribute_label, wp_posts.post_type, wp_posts.post_title FROM wp_woocommerce_attribute_taxonomies,wp_posts WHERE wp_posts.post_type = 'product_variation' OR wp_posts.post_type = 'product'

I hope that helps, or points you in the right direction



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.