Pro module2 abilities

WooCommerce reports ability reference

Reference for the GoBuildWP Pro 1.12.4 source. Installed schemas and policy remain authoritative.

This WooCommerce reports ability reference covers the sales figures an agent can pull for any date range: orders, items, gross and net sales, discounts and refunds grouped by day, week or month, and per-product units and revenue. Ranges are calendar days in the store's timezone, and a refund is subtracted on the day it was issued rather than the day of the order.

Read-only, write and destructive groups describe the source annotations. They do not establish a minimum safety profile, human approval or undo support. Those controls are separate: check the installed ability, the connected user and the active site policy before calling it. A read can still return sensitive data. These pages are not evidence that every operation passed an end-to-end runtime test.

What WooCommerce reports needs before these load

WooCommerce 9.0 or newer must be active. The gate checks the WooCommerce class and compares WC_VERSION with WPPILOT_PRO_WOOCOMMERCE_MIN_VERSION, the same floor the store abilities use, so an older WooCommerce keeps the module from loading. Both calls check view_woocommerce_reports, the capability WooCommerce attaches to its reports, after GoBuildWP's own run check. Neither writes anything, so nothing reaches the change ledger. The older wppilot/woocommerce-sales-summary stays registered for existing callers.

Minimum (base)
9.0 WPPILOT_PRO_WOOCOMMERCE_MIN_VERSION
WooCommerce reports editions
free

Stored orders or WooCommerce Analytics

Every result names its source. By default the figures are computed from orders read through wc_get_orders(), which is safe with HPOS, up to 5,000 orders per call; beyond that the result carries truncated: true and a note suggesting a shorter range or source=analytics. With source left on auto, a range holding more than 5,000 orders and no product filter is answered by WooCommerce Analytics instead, through an in-process request to its revenue and product report routes.

Orders are the default because Analytics can lag behind the orders table. The kit's development notes record one store, on WordPress 7.1 with WooCommerce 11.1.2, where Analytics reported zero orders while five existed, because its import had not run; that is one recorded case, not a measured rate. If Analytics cannot answer, the call returns woo_reports_analytics_unavailable.

What each amount means

The vocabulary is WooCommerce's. gross_sales is line subtotals before discounts; net_sales is line totals after discounts; both leave out tax and shipping. refunded_items is the value of product lines refunded inside the range, placed by refund date, net_after_refunds is net_sales minus that, and total_sales is order totals including tax and shipping less every refund, reported for the whole store. Once a product or category filter is set, amounts become line items and drop tax, shipping and whole-order refunds, which the result's notes repeat.

Unless statuses are named, WooCommerce's paid statuses are counted. One call covers at most 732 days (woo_reports_range_too_long); leaving from out means the 29 days before to, and a malformed date returns woo_reports_bad_date. Product sales lists up to 100 products, sorted by net_sales or quantity, with variations counted under their parent. Each result also states that it is not an accounting, tax, payout or settlement report.

Before accepting the result

Read the store timezone, source, selected statuses and tax, shipping and refund treatment alongside totals. Label partial or truncated results before interpreting them; a bounded report is not a complete accounting reconciliation.

Safety profiles and human confirmation

Representative call sequence

This sequence describes the documented calls and checks to perform. It is not a recorded result from an installed WordPress site. Inspect returned errors and partial results, then verify the saved values and affected output before proceeding.

How did September go, and which products carried it?

  1. 01 wppilot/woocommerce-sales-report Returns orders, net sales, refunds and total_sales for 2026-09-01 to 2026-09-30 grouped by week, with the source that answered.
  2. 02 wppilot/woocommerce-product-sales Ranks the month's products by net_sales, with units and refunded units per product and variations folded into their parent.

Questions about WooCommerce reports

Why do these figures differ from the Analytics screen?

They are read from the orders themselves by default, while Analytics is as current as its last import. Pass source=analytics to compare the two directly; a product filter always reads the orders, even when Analytics is asked for.

How is this different from woocommerce-sales-summary?

The older call reads at most 2,000 orders, counts whole days back from now in UTC and ignores refunds. These reports use calendar dates in the store's timezone and net refunds out.

What happens on a store with a very busy month?

Above 5,000 orders in the range, auto mode hands the question to WooCommerce Analytics unless a product filter is set; with source=orders the result is marked truncated and the note says the figures are partial.

WooCommerce reports reads

AbilityWhat it does
wppilot/woocommerce-product-salesWooCommerce Product SalesBest-selling products for a date range in the store's timezone: units sold, units refunded, net sales and refunds per product, with variations counted under their parent. Sort by net_sales or quantity; filter by product_ids or category_ids. Reads stored orders unless the range holds more than 5,000 orders or source is "analytics"; a product_ids filter always reads stored orders (only the first 5,000, reported as partial), while a category_ids filter can use Analytics. The result names its source.
wppilot/woocommerce-sales-reportWooCommerce Sales ReportSales for a date range in the store's timezone, with refunds netted by their refund date: orders, items sold, gross and net sales, discounts, refunds and total sales, overall and per day, week or month. Counts WooCommerce's paid statuses unless statuses are given. Filter by product_ids (products or variations) or category_ids to get line-item figures for those only (no tax, shipping or whole-order refunds). Reads stored orders (source "orders") and falls back to WooCommerce Analytics only when the range holds more than 5,000 orders or source is "analytics"; a filtered report always reads stored orders, so on a range over 5,000 orders it covers only the first 5,000 and says the figures are partial. The result names its source. Not an accounting, tax or payout report.

For the task-level view of WooCommerce reports, with worked requests and what to check afterwards, see WooCommerce integration page.