RT Advance Order Reporting
RT Advance Order Reporting adds a powerful reporting section under WooCommerce in the WordPress admin. Version 2.0 rebuilds the dashboard interface in React (charts via Recharts) while keeping the same server-side data layer and AJAX endpoints.
Features
- Sales Summary – revenue, order count, AOV, items sold + daily revenue/orders chart
- Orders by Status – doughnut chart + breakdown table
- Top Products – ranked by revenue with visual bar meters
- Top Customers – ranked by lifetime value in the selected period
- Refunds & Cancellations – summary KPIs + full order table with direct admin links
- Period filters: Today, Yesterday, This Week, This Month, Last Month, This Year, Custom Range
- Advanced filters: billing email, country & state (billing or shipping scope), payment gateway, shipping method, and tax class — applied across every report tab and the CSV export
- CSV Export for every report tab
- Auto-refreshes every 60 seconds (live badge) + manual refresh
- WordPress Dashboard Widget showing today’s totals at a glance
For developers
The React source lives in src/. To rebuild the bundle after editing it:
npm install
npm run build # builds assets/css/dashboard.css (Sass) + assets/js/dashboard.js (esbuild)
npm run watch:js # rebuild JS on change
npm run watch:css # rebuild CSS on change
Build tooling: esbuild (JS bundling) + Dart Sass (styles). Styles are authored
in src/dashboard.scss as hand-written, custom CSS — no utility framework — with
every rule scoped under .rtao-aor-app so wp-admin styling is never affected.
React, ReactDOM, Recharts and icons are bundled into a single self-contained
file, so the script declares no WordPress JS dependencies.
The data contract is unchanged from 1.x: the React app POSTs to admin-ajax.php
(action=rtao_aor_data) and reads window.rtaoAOR (ajaxurl, nonce, currency).
CSV export reuses action=rtao_aor_export.