Products are located mainly in the following tables:
wp_poststable withpost_typelikeproduct(orproduct_variation),wp_postmetatable withpost_idas relational index (the product ID).wp_wc_product_meta_lookuptable withproduct_idas relational index (the post ID) | Allow fast queries on specific product data (since WooCommerce 3.7)wp_wc_order_product_lookuptable withproduct_idas relational index (the post ID) | Allow fast queries to retrieve products on orders (since WooCommerce 3.7)
Product types, categories, subcategories, tags, attributes and all other custom taxonomies are located in the following tables:
wp_termswp_termmetawp_term_taxonomywp_term_relationships– columnobject_idas relational index (the product ID)wp_woocommerce_termmetawp_woocommerce_attribute_taxonomies(for product attributes only)wp_wc_category_lookup(for product categories hierarchy only since WooCommerce 3.7)
Product types are handled by custom taxonomy product_type with the following default terms:
simplegroupedvariableexternal
Some other product types for Subscriptions and Bookings plugins:
subscriptionvariable-subscriptionbooking
Since Woocommerce 3+ a new custom taxonomy named product_visibility handle:
- The product visibility with the terms
exclude-from-searchandexclude-from-catalog - The feature products with the term
featured - The stock status with the term
outofstock - The rating system with terms from
rated-1torated-5
Particular feature: Each product attribute is a custom taxonomy…
References:
- Normal tables: WordPress database description
- Specific tables: Woocommerce database description
