WooCommerce

WooCommerce is an open-source, e-commerce plugin for WordPress. It is designed for small to large-sized online merchants using WordPress. It uses a MySQL database.

The details associated with the content in WooCommerce are stored as Events in the MySQL database. For example, orders, payments, and shipping. WooCommerce provides some default tables and also allows you to create custom tables. You can replicate the Events data from your WooCommerce account to a Destination database or data warehouse using Hevo Pipelines.

Note: You must provide the MySQL database details to configure the WooCommerce Source.


Prerequisites


Perform the following steps to configure WooCommerce via MySQL as the Source in your Pipeline. You must provide details of the MySQL database to configure the WooCommerce Source.

Whitelist Hevo’s IP Addresses

Click your MySQL variant below for steps to whitelist Hevo’s IP address:


Grant Privileges to the User

Perform the following steps to grant the SELECT privilege to the database user:

  1. Log in to your MySQL database instance as a root user. For example, mysql -u root -p.

  2. Run the following command to grant SELECT privilege to the database user:
    GRANT SELECT ON *.* TO 'username'; # to grant privileges to a user with <username> as username


Specify MySQL Connection Settings:

Specify the following settings in the Configure your WooCommerce via MySQL Source page:

Configure WooCommerce via MySQL as a Source

  • Pipeline Name: A unique name for your Pipeline.

  • Database Host: The MySQL host’s IP address or DNS.

    Note: For URL-based hostnames, exclude the http:// or https:// part. For example, if the hostname URL is http://mysql-replica.westeros.inc, enter mysql-replica.westeros.inc.

  • Database Port: The port on which your MySQL server is listening for connections. Default value: 3306.

  • Database User: The authenticated user that can read the tables in your database.

  • Database Password: Password for the database user.

  • Database Name: The database you want to load data from, if the Pipeline mode is Table or Custom SQL.

  • Connection Settings

    • Connect through SSH: Enable this option to connect to Hevo using an SSH tunnel, instead of directly connecting your MySQL database host to Hevo. This provides an additional level of security to your database by not exposing your MySQL setup to the public. Read Connecting Through SSH.

      If this option is disabled, you must whitelist Hevo’s IP addresses. Refer to the content for your MySQL variant for steps to do this.

    • Use SSL: Enable it to use SSL encrypted connection. To enable this, specify the following:

      • CA File: The file containing the SSL server certificate authority (CA).

      • Client Certificate: The client public key certificate file.

      • Client Key: The client private key file.

Click TEST & CONTINUE to proceed for setting up the Destination.


Schema and Primary Keys

The schema is derived based on the data in your MySQL Source tables.


Data Model

WooCommerce is a WordPress plugin and uses many of the WordPress tables. See the WordPress Database Description document to understand the structure of WordPress.

The following is the list of tables (objects) that are created by default at the Destination when you run the Pipeline. In addition to the default tables, you can ingest any custom tables that you have created.

Note: Each table name is prefixed with your <_WP Database="" Table="" Prefix="">_, for example, _wp__.

Object Description
actionscheduler_actions Contains information on actions executed by Action Scheduler.
actionscheduler_claims Contains the lists of claims associated with each order.
actionscheduler_groups Contains the groups associated with orders.
actionscheduler_logs Contains the Action Scheduler execution logs.
woocommerce_sessions Contains the customer session data, such as carts.
woocommerce_api_keys Contains the API keys used for the REST API.
woocommerce_attribute_taxonomies Contains the global attribute taxonomy names for products.
woocommerce_downloadable_product_permissions Contains the product access permissions for downloadable products (granted after purchase).
woocommerce_order_items Contains the items associated with orders.
woocommerce_order_itemmeta Contains the metadata of order items.
woocommerce_tax_rates Contains the tax rates defined in the admin area.
woocommerce_tax_rate_locations Contains the locations (postcodes and cities) associated with the tax rates.
woocommerce_shipping_zones Contains the shipping zones created in the Settings area.
woocommerce_shipping_zone_locations Contains the list of locations associated with your shipping zones.
woocommerce_shipping_zone_methods Contains the list of shipping methods linked to your shipping zones.
woocommerce_payment_tokens Contains the list of customer payment tokens (used by gateways).
woocommerce_payment_tokenmeta Contains the metadata associated with payment tokens.
woocommerce_log Contains the general logs which is used as an alternative to file based logging.
wc_webhooks Contains the list of webhooks that have been setup on the store.
wc_download_log Contains the list of products download by the user.
wc_product_meta_lookup Contains the order metadata for indexing, to speed up requests.
wc_tax_rate_classes Contains the tax classes data.
wc_reserved_stock Contains the list of reserved stocks to ensure availability at checkout.

Learn more about WooCommerce database.


Limitations

  • The WordPress SQL table prefix should be less than 20 characters. Otherwise, WooCommerce is unable to create the tables properly and can lead to problems in loading the data.

See Also


Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Jan-24-2022 1.80 New document.
Last updated on 19 Aug 2022

Tell us what went wrong