If you ever need to retrieve information from an online store it is vital that you know how the information is stored in its database, in which table what is stored.
With WooCommerce is the same, it creates a lot of tables in the WordPress database, no less than 23 tables, and it is important that you know 2 things:
- Which are the tables that WooCommerce needs, so as not to delete any by mistake.
- What each one is for, in case you need to store or retrieve information from some of the tables.
Especially if you are a programmer specialized in WordPress and WooCommerce, this is information you should know.
Currently, according to the official documentation, these are the tables that WooCommerce adds to the WordPress database, and their usefulness:
Table name | Description |
---|---|
actionscheduler_actions | Stores information about actions to be executed by the action scheduler. |
actionscheduler_claims | |
actionscheduler_groups | |
actionscheduler_logs | Action scheduler execution logs. |
woocommerce_sessions | Stores customer session data, such as shopping carts. |
woocommerce_api_keys | Stores the API keys used for the REST API. |
woocommerce_attribute_taxonomies | Stores the product attribute taxonomy names. |
woocommerce_downloadable_product_permissions | Stores access permissions for downloadable products (granted after purchase). |
woocommerce_order_items | Stores line items associated with orders. |
woocommerce_order_itemmeta | Stores meta data on order line items. |
woocommerce_tax_rates | Stores the tax rates you configure in the WooCommerce settings. |
woocommerce_tax_rate_locations | Stores locations (zip codes and cities) associated with tax rates. |
woocommerce_shipping_zones | Stores the shipping zones you create in the WooCommerce settings. |
woocommerce_shipping_zone_locations | Store the locations associated with your shipping zones. |
woocommerce_shipping_zone_methods | Store the shipping methods associated with your shipping zones. |
woocommerce_payment_tokens | Stores customer payment tokens (used by payment gateways). |
woocommerce_payment_tokenmeta | Stores the meta data of the payment tokens. |
woocommerce_log | General logging table (alternative to file-based logging). |
wc_webhooks | Stores any webhooks that have been configured in the store. |
wc_download_log | Logs user downloads of downloadable products. |
wc_product_meta_lookup | Revises the table that indexes the meta data of the orders to speed up the requests. |
wc_tax_rate_classes | Stores the data of the tax types. |
wc_reserved_stock | Stores reserved inventory and is used to avoid sequence conditions during payment. |
Note: The names of each table are missing the prefix of your WordPress database, e.g. wp_
More information and details about the parameters and attributes of each table in the official WooCommerce development wiki.