Export Woo Customer Data
Export WooCommerce customer data to CSV with customizable fields via dashboard widget.
by Paul Faulkner · github.com/headwalluk/export-woo-customer-data · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/headwalluk/export-woo-customer-data/releases/download/v1.1.2/export-woo-customer-data.zipReadme
Export Woo Customer Data
Version: 1.1.2
Requires: WordPress 6.0+, PHP 8.0+, WooCommerce 9.0+
License: GPLv2 or later
A lightweight WordPress/WooCommerce utility plugin to export customer data via CSV with customizable fields.
Features
- ✅ Dashboard Widget - One-click export buttons on WordPress dashboard
- ✅ Two Export Modes - Export all users or WooCommerce customers only
- ✅ Pretty URLs - Clean download links like
/wp-admin/exportwcd-reports/customers-only.csv - ✅ HPOS Compatible - Works with WooCommerce High-Performance Order Storage
- ✅ Customizable Fields - Extensible via filter hooks
- ✅ Excel-Friendly - UTF-8 BOM for proper character encoding
- ✅ Secure - Admin-only access with capability checks
Installation
Via WordPress Admin
- Upload the plugin folder to
/wp-content/plugins/ - Activate via Plugins → Installed Plugins
- Navigate to Dashboard to see the widget
Via WP-CLI
wp plugin activate export-woo-customer-data
Usage
Basic Export
- Go to the WordPress Dashboard
- Find the Export Customer Data widget
- Click one of two buttons:
- Export All Users - All WordPress user accounts
- Export Customers Only - Users who have placed orders (requires WooCommerce)
- CSV file downloads automatically
Default Export Fields
| Field | Source |
|---|---|
| User ID | wp_users.ID |
| First Name | wp_usermeta.first_name |
| Last Name | wp_usermeta.last_name |
wp_users.user_email |
|
| Billing Phone | wp_usermeta.billing_phone |
| Shipping Phone | wp_usermeta.shipping_phone |
Developer Documentation
Customizing Export Fields
Use the export_woo_customer_data_fields filter to modify field mapping:
add_filter( 'export_woo_customer_data_fields', function( $fields ) {
// Add user login
$fields['username'] = array(
'table' => 'users',
'column' => 'user_login',
);
// Add custom user meta
$fields['phone'] = array(
'table' => 'usermeta',
'meta_key' => 'phone',
);
// Remove a field
unset( $fields['shipping_phone'] );
return $fields;
} );
Field Configuration Structure
Each field requires:
For wp_users table:
array(
'table' => 'users',
'column' => 'column_name', // e.g., 'user_email', 'user_login', 'ID'
)
For wp_usermeta table:
array(
'table' => 'usermeta',
'meta_key' => 'meta_key_name', // e.g., 'first_name', 'billing_phone'
)
Pretty URL Structure
Export URLs follow this pattern:
- All Users:
/wp-admin/exportwcd-reports/all-users.csv - Customers Only:
/wp-admin/exportwcd-reports/customers-only.csv
These URLs:
- Require
manage_optionscapability - Generate CSV on-the-fly (no file storage)
- Stream directly to browser
- Trigger download automatically
Security
- Capability Check: Only users with
manage_options(admins) can export - HPOS Compatible: Uses WooCommerce CRUD methods for order data
- No File Storage: CSV generated in-memory and streamed
- Input Validation: Report types validated against whitelist
- WordPress Standards: Follows WordPress Security Best Practices
HPOS Compatibility
The plugin automatically detects and supports WooCommerce High-Performance Order Storage (HPOS):
- HPOS Enabled: Queries
wp_wc_orderstable - Legacy Mode: Queries
wp_postmetafor_customer_user
Compatibility is declared via FeaturesUtil::declare_compatibility().
File Structure
export-woo-customer-data/
├── export-woo-customer-data.php # Main plugin file
├── constants.php # Plugin constants
├── functions-private.php # Helper functions
├── includes/
│ ├── class-plugin.php # Main plugin class
│ ├── class-admin-hooks.php # Dashboard widget
│ └── class-csv-exporter.php # CSV generation logic
├── dev-notes/ # Development documentation
├── README.md # This file
├── readme.txt # WordPress.org readme
└── CHANGELOG.md # Version history
Requirements
- WordPress: 6.0 or higher
- PHP: 8.0 or higher
- WooCommerce: 7.0+ (optional, required for "Customers Only" export)
Privacy & Compliance
This plugin exports sensitive user data including:
- Email addresses
- Phone numbers
- User IDs
Important: Ensure you have:
- User consent for data export (GDPR compliance)
- Appropriate data handling policies
- Secure download/storage of exported files
Changelog
See CHANGELOG.md for version history.
Support
For issues, questions, or feature requests:
- Website: https://headwall.tech
- Plugin Repository: GitHub (link TBD)
License
This plugin is licensed under GPLv2 or later.
Copyright (C) 2026 Headwall Tech
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Credits
Developed by: Headwall Tech
Version: 1.0.0
Release Date: January 29, 2026
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v1.1.2 | Jan 30, 2026 | export-woo-customer-data-1.1.2.zip | 0 |
| v1.1.2 | Jan 30, 2026 | export-woo-customer-data.zip | 4 |
| v1.1.1 | Jan 29, 2026 | export-woo-customer-data.zip | 0 |
| v1.1.1 | Jan 29, 2026 | export-woo-customer-data-1.1.1.zip | 0 |
| v1.1.0 | Jan 29, 2026 | export-woo-customer-data.zip | 2 |
| v1.1.0 | Jan 29, 2026 | export-woo-customer-data-1.1.0.zip | 0 |