T.Doe T.Doe - 1 year ago 75
SQL Question

WooCommerce: Finding the products in database

I'm creating a website using WooCommerce and I want to restrict the available products to users depending on the postcode that they enter in the search form on my home page.

To be able to achieve that I'll have to specify the conditions of each product within the database in phpMyAdmin, but I can't seem to find it.

Does anybody know where the woocommerce database for products and/or categories are within phpmyAdmin?

Thank you in advance.


Products are located mainly in 2 tables:

  • wp_posts table with a post_type like product or variable_product,

  • wp_postmeta table with a product_id by product.

Product categories, subcategories, and tags are located in tables:

  • wp_terms

  • wp_termmeta

  • wp_term_taxonomy

  • wp_term_relationships

  • wp_woocommerce_termmeta