Understands the WordPress schema
wp_posts, wp_postmeta or the newer HPOS tables. Adea works out which variant your shop uses.
Stack · WooCommerce
WooCommerce stores orders in WordPress tables with meta fields nobody remembers the names of. Adea knows them and asks the shop for you, even when you have your own plugins.
What share of October's orders used a discount code?
27% of orders
412 of 1,526 orders had at least one coupon. The code SUMMER20 accounted for 61% of them.
Sourceswp-content/plugins/woocommerce/src/Internal/DataStores/Orders
The code Adea read · wp-content/plugins/woocommerce/src/Internal/DataStores/Orders
wc_orders -- orders woocommerce_order_items WHERE order_item_type = 'coupon'
The query Adea ran (read-only)
SELECT count(DISTINCT o.id) FILTER (WHERE i.order_item_id IS NOT NULL) AS with_coupon FROM wp_wc_orders o LEFT JOIN wp_woocommerce_order_items i ON i.order_id = o.id AND i.order_item_type = 'coupon' WHERE o.date_created_gmt >= '2026-10-01'
wp_posts, wp_postmeta or the newer HPOS tables. Adea works out which variant your shop uses.
Every answer shows which order statuses were counted. So you know whether "completed" also includes pending payments.
Nothing is installed in WordPress. Adea reads a read replica of the database.
Create a MySQL user with read access. Give Adea access to the code if you have your own plugins or themes with business rules.
CREATE USER 'adea_readonly'@'%' IDENTIFIED BY '…'; GRANT SELECT ON wordpress.* TO 'adea_readonly'@'%';
No. Without a code base Adea answers from the database. With code it also understands your own rules.
If the host allows an external read-only database user. Ask the host, or use a read replica.
Yes, as long as the tables are open to the role.