Export Features
Quick Export Admin Page
URL: wp-admin/admin.php?page=wkaie-export
| Control | Values |
|---|---|
| Engine | Plugin pipeline (default) · WordPress native · WooCommerce native |
| Entity | 15 types — see below |
| Format | CSV (default) · JSON · XML · WXR (only with WordPress native engine) |
| Preview | Row count + column count before running |
| Run Export | Exports file, shows one-click Download link |
Three Export Engines
| Engine | Output | Use when |
|---|---|---|
| Plugin pipeline | CSV / JSON / XML, all 15 entities, streaming for large datasets | Default. Nearly every case |
| WordPress native | WXR XML | Full site backup re-importable into WordPress |
| WooCommerce native | CSV matching WC core exporter byte-for-byte | Round-trip through WC core Product CSV Importer |
15 Entity Types
Product · Order · Customer · User · Coupon · Category · Tag · Attribute · Review · Subscription · Booking · Membership · Post · Page · Menu.
Subscription / Booking / Membership appear only if the matching plugin is active.
4 Output Formats
| Format | Notes |
|---|---|
| CSV | Products default to WooCommerce-standard shape (re-importable by WC core) |
| JSON | Array of objects, header as keys |
| XML | <items><item>...</item></items>, one element per row |
| WXR | Only with WordPress native engine |
Fast Export for Large Datasets
Plugin auto-switches to streaming mode for CSV exports above 2000 rows. Memory stays flat regardless of row count. Ran 10031 products → 7.3 MB CSV in seconds on the test box.
REST Endpoints
Base: /wp-json/wkaie/v1
| Method | Path | Purpose |
|---|---|---|
| GET | /export/preview?entity=<slug> | Entity label, total row count, column list |
| POST | /export | Run export. Args: entity, format, columns[], filters{}, limit, offset, template, return_file |
Permission: manage_woocommerce. Auth: cookie + nonce, Basic, or JWT.
return_file: true → response body = raw file bytes. Default returns a signed download_url.
WP-CLI
wp wkaie-export <subcommand> [<job_id>] [--output=<abs-path>] [--format=<csv|json|xml>] [--limit=<n>] [--status=<s>]
Subcommands: run (by job ID) · products · orders.
wp wkaie-export run 42
wp wkaie-export products --output=products.csv --format=csv
wp wkaie-export orders --status=completed --output=orders.csv
See export-server-path.
Saved Export Jobs
Create a saved job with type = export in the Jobs editor. Run via:
- Run button on the Jobs list
- Scheduled cron
- Event triggers (WooCommerce hooks, job chain)
Every run logs to the History page.
Export History
Every run (Quick Export, REST, CLI, saved job) gets a row with:
- Entity type
- Records exported
- Elapsed time
- Status / error message
- Link to the output file
View: admin.php?page=wkaie-history.
Browser Download
Signed one-click link — nonce-gated, capability-gated, path-validated. Full detail: export-download.
Server Path
Absolute path delivery via WP-CLI --output=. Full detail: export-server-path.
