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:
|Stores information about actions to be executed by the action scheduler.|
|Action scheduler execution logs.|
|Stores customer session data, such as shopping carts.|
|Stores the API keys used for the REST API.|
|Stores the product attribute taxonomy names.|
|Stores access permissions for downloadable products (granted after purchase).|
|Stores line items associated with orders.|
|Stores meta data on order line items.|
|Stores the tax rates you configure in the WooCommerce settings.|
|Stores locations (zip codes and cities) associated with tax rates.|
|Stores the shipping zones you create in the WooCommerce settings.|
|Store the locations associated with your shipping zones.|
|Store the shipping methods associated with your shipping zones.|
|Stores customer payment tokens (used by payment gateways).|
|Stores the meta data of the payment tokens.|
|General logging table (alternative to file-based logging).|
|Stores any webhooks that have been configured in the store.|
|Logs user downloads of downloadable products.|
|Revises the table that indexes the meta data of the orders to speed up the requests.|
|Stores the data of the tax types.|
|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.