Solution for : WooCommerce: Finding the products in database
Products are located mainly in 2 tables:
wp_posts
table with apost_type
likeproduct
orproduct_variation
,wp_postmeta
table with the correspondingpost_id
by product (the product ID).
Product types, categories, subcategories, tags, attributes and all other custom taxonomies are located in the following tables:
wp_terms
wp_termmeta
wp_term_taxonomy
wp_term_relationships
wp_woocommerce_termmeta
wp_woocommerce_attribute_taxonomies
(for product attributes only)
Product types are handled by custom taxonomy product_type
with the following default terms:
simple
grouped
variable
external
Since Woocommerce 3+ a new custom taxonomy named product_visibility
handle:
- The product visibility with the terms
exclude-from-search
andexclude-from-catalog
- The feature products with the term
featured
- The stock status with the term
outofstock
- The rating system with terms from
rated-1
torated-5
Particular feature: Each product attribute is a custom taxonomy…
References:
- Normal tables: Wordpress database description
- Specific tables: Woocommerce database description
No comments:
Post a Comment