Heads up! We’re merging this plugin with our WooCommerce Customer / Order / Coupon Export plugin, which supports both XML and CSV exports. Click here to learn more about this plugin.
- If you are a new customer, please check out our WooCommerce Customer / Order / Coupon Export plugin.
- If you are a current WooCommerce Customer / Order XML Export Suite user and want to migrate now, please contact WooCommerce support to request an early migration to the new plugin.
Want to export your orders to the Stamps.com desktop client? Check out the Stamps.com XML File Export extension instead!
Overview
↑ Back to topThis plugin requires WordPress 4.4 or newer to export data from WooCommerce.
Working on customizations? Developers, you can find developer documentation here.
Sample XML Files
↑ Back to top
Order XML Exports
Default Format
Legacy Format
Customer XML Exports
Default Format
Legacy Format
Legacy Formats represent formatting for all versions prior to 2.0 for backwards compatibility.
The extension is very flexible and the output can be customized or replaced entirely with your own specific format. Learn more in the developer documentation.
Installation
↑ Back to top- Download the extension from your WooCommerce.com dashboard
- Ensure your store uses WordPress 4.4 or newer.
- Go to Plugins > Add New > Upload and select the ZIP file you just downloaded
- Click Install Now, and then Activate
- Click the Configure link and read the next section to learn how to setup and configure the plugin.
Export Processing
↑ Back to topCustom Export Formats
↑ Back to topTo use a custom format, be sure this format is selected under the “Export Format” settings for orders or customers.
You can view your custom formats settings from WooCommerce > XML Export > Custom Format, and switch between the “Orders” and “Customers” section to customize your format for each.
You can build this format manually, or you can click Load Column Mapping in the bottom-right corner. This will let you load one of the pre-built order or customer formats as a starting point, which you can then modify.
Custom Meta Keys
↑ Back to topYou must know the correct meta key for the data and use it when adding a column for meta.
If you’re not sure, running an export with “add all meta” enabled will add columns for each meta key, which should help you determine the meta key for the data you want (it will be the column name).
Static Values
↑ Back to topCustom Export Format Settings
↑ Back to top- Indent output – Enable this to pretty print the XML with indents. Useful if a human is reading the XML instead of a machine, can be disabled otherwise.
- Include all meta – Enable this to add all order or user meta to the export, one tag per meta key (this will include hidden meta)
Order Export Settings
↑ Back to topExport Format Settings (Orders)
↑ Back to top- Export Format – Change the format for your order exports. The export formats are:
- Default – This format was added in version 2.0 and includes detailed order export information.
- Legacy – This format was used in the plugin prior to version 2.0; we recommend using the default for new installations.
- Custom – This format will use the field mapping you’ve created under the “Custom Formats” tab for the order export.
- Order Export Filename – Change the name of the filename that is exported. You can use
%%timestamp%%
to represent the date / time (in YYYY_MM_DD_H_S format), and%%order_ids%%
to include a dash-separated list of the order IDs exported in the file. - Add Order Notes – Enable this to add a note to orders when they’re exported. This note will only be added the first time an order is exported, and is not added for subsequent exports.
- Batch Processing – Uses batch processing for manual order exports instead of processing these asynchronously. Can be used when background processing is not supported, but requires you to keep the page open while running an export.
Automated Export Settings (Orders)
↑ Back to top- Automatically Export Orders – Select an auto-export method to automatically export un-exported orders on the recurring interval set. Auto exports only include “new” (non-exported) orders with each run.
- Trigger Automatic Export – Determine whether auto-exports should happen for each order after it’s marked “paid”, or if exports should happen on a defined schedule.
- Export Start Time – (If exports are scheduled) Choose the start time for automatic order exports. The next export will run at the chosen time and continue on the recurring interval set.
- Export Interval – (If exports are scheduled) Choose the interval for automatic order exports. The default is 30 minutes.
- Order Statuses – Select the order statuses that should be automatically exported. For example, if you only want processing and completed orders to be exported, use the multi-select box and click on “Processing” and “Completed”. Leave this blank to export new orders with any status.
- Product Categories – Select product categories for automated exports. This will only include orders that contain products from the selected categories. Leave this blank to export new orders with any product category.
- Products – Select products for automated exports. This will only include orders that contain the selected products. Leave this blank to export new orders with any product.
Email Settings (Orders)
- Recipient(s) – Enter recipient email address(es) to receive the XML export. Separate multiple addresses with commas. Defaults to site admin email.
- Email Subject – Enter the subject of the Export email. Defaults to
[Store Name] Order XML Export
. - Test – Once you save your email settings, you can send a test email with a dummy XML file to check your settings.
Local Exports (Orders)
Local auto-exports have no specific settings; these files are generated and simply saved for 14 days in your “Export List” without being transferred.FTP Settings (Orders)
- Server Address – Enter either an IP address or hostname for the FTP server
- Username – Enter the username for the FTP server
- Password – Enter the password for the FTP server
- Port – Enter the port to connect to for FTP. This should be port 21 for regular FTP, 22 for SFTP, and 990 for FTP with Implicit SSL
- Initial Path – Enter the initial path to change to before uploading the export file. The initial path already includes a leading slash so do not include one. It does require trailing slash. For example, to upload to a “test” folder, you would enter
test/
. If you are connecting via SFTP, the initial path needs to be a full path to the folder if the username you are connecting with does not default to the HOME directory - Security – Choose the type of security for the FTP server. Ask your FTP provider if you’re unsure what to select.
- Passive Mode – Enable this to turn on passive mode for FTP connections. This should be unchecked unless you are having issues connecting, especially if you are seeing the “PORT command successful” message followed by a timeout in the error log
HTTP POST Settings (Orders)
- HTTP POST URL – Enter the URL to which you want to POST the exported CSV.
Customer Export Settings
↑ Back to topExport Format Settings (Customers)
↑ Back to top- Customer Export Format – Select the format for your customer exports. The export formats are:
- Default – This format was added in version 2.0 and includes detailed customer export information.
- Legacy – This format was used in the plugin prior to version 2.0; we recommend using the default for new installations.
- Custom – This format will use the field mapping you’ve created under the “Custom Formats” tab for the customer export.
- Customer Export Filename – Change the name of the filename that is exported. You can use
%%timestamp%%
to represent the date / time (in YYYY_MM_DD_H_S format). - Batch Processing – Uses batch processing for manual order exports instead of processing these asynchronously. Can be used when background processing is not supported, but requires you to keep the page open while running an export.
Automated Export Settings (Customers)
↑ Back to top- Automatically Export Customers – Select an auto-export method to automatically export un-exported customers on the recurring interval set. Auto exports only include “new” (non-exported) customers with each run.
- Export Start Time – (If exports are scheduled) Choose the start time for automatic customer exports. The next export will run at the chosen time and continue on the recurring interval set.
- Export Interval – (If exports are scheduled) Choose the interval for automatic customer exports. The default is 30 minutes.
Email Settings (Customers)
- Recipient(s) – Enter recipient email address(es) to receive the XML export. Separate multiple addresses with commas. Defaults to site admin email.
- Email Subject – Enter the subject of the Export email. Defaults to
[Store Name] Order XML Export
.
Local Exports (Customers)
Local auto-exports have no specific settings; these files are generated and simply saved for 14 days in your “Export List” without being transferred.FTP Settings (Customers)
- Server Address – Enter either an IP address or hostname for the FTP server
- Username – Enter the username for the FTP server
- Password – Enter the password for the FTP server
- Port – Enter the port to connect to for FTP. This should be port 21 for regular FTP, 22 for SFTP, and 990 for FTP with Implicit SSL
- Initial Path – Enter the initial path to change to before uploading the export file. The initial path already includes a leading slash so do not include one. It does require trailing slash. For example, to upload to a “test” folder, you would enter
test/
. If you are connecting via SFTP, the initial path needs to be a full path to the folder if the username you are connecting with does not default to the HOME directory - Security – Choose the type of security for the FTP server. Ask your FTP provider if you’re unsure what to select.
- Passive Mode – Enable this to turn on passive mode for FTP connections. This should be unchecked unless you are having issues connecting, especially if you are seeing the “PORT command successful” message followed by a timeout in the error log
HTTP POST Settings (Customers)
- HTTP POST URL – Enter the URL to which you want to POST the exported CSV.
Manual Exports
↑ Back to top- Order Statuses – Select the order statuses that should be exported. For example, if you only want processing and completed orders to be exported, use the multi-select box and click on “Processing” and “Completed”. Leave this blank to export orders with any status.
- Product Categories – Select product categories for the export. This will only include orders that contain products from the selected categories. Leave this blank to export orders with any product category.
- Products – Select products for the export. This will only include orders that contain the selected product(s). Leave this blank to export orders with any product.
- Start Date – Enter a start date for the export. This will only include orders placed after the start date. Leave blank to include all orders.
- End Date – Enter an end date for the export. This will only include orders placed before the ned date. Leave blank to include all orders.
Order Export Actions
↑ Back to topCustomer Export Actions
↑ Back to topManual Transfers
↑ Back to topAutomatic Exports
↑ Back to topIf background processing is not available on your site, note that you’ll see an error message, and that automated exports will not process.
Both orders and customers can be exported via Email, FTP, or HTTP POST on a schedule, or saved locally to your export list on a schedule. To configure your automatic export settings, please see our notes on order auto-export settings or customer auto-export settings.
Here are some important notes about automated exports, which address common questions:
- Orders that were placed before the plugin was installed & activated will not be automatically exported. They can be marked as “exported” using the bulk action.
- For automated exports, only “new” records will be exported. For orders, this means any order that does not have the “Export Status” as “exported”. For customers, this means only new purchasers or newly registered users are included in automated exports (customer export status is hidden).
- Timezones: Please note that the exports happen in the same timezone as you’ve set for the WordPress site. If the site timezone is set to New York (EST) and the export time is set to 9:30am, the exports happen in the same timezone as the site.
- Auto-exports should always be tested once configured to confirm dummy files reach their destination successfully using the “Test” actions.
Export Schedules
↑ Back to top- Setup a real system cron on your server that ensures WP-Cron is triggered every minute – this article explains how to do this.
- Use a service like Pingdom, UptimeRobot, etc to ping your site every few minutes – this FAQ section details how to do this.
Transfer Monitoring
↑ Back to topTesting Auto-Exports
↑ Back to topCompatible Plugins
↑ Back to topExtension | Tags Added | Notes |
---|---|---|
AvaTax | VATId TaxExemption* *customer export only |
customer VAT ID customer tax exemption code |
Checkout Field Editor | CheckoutFields →FieldName |
wrapper tag value for custom field |
Cost of Goods | OrderCostTotal LineCostTotal ItemCost |
the total cost for the order the total cost for the line item the individual cost for the item |
Checkout Add-ons | CheckoutAddOns →ID →Name →Value →Cost |
wrapper tag field ID the admin name for the field the customer’s input for the field the total cost for this field |
Admin Custom Order Fields | CustomFields →ID →Name →Value |
wrapper tag/>field ID the admin name for the field the input for the field on this order |
Sequential Order Numbers Pro | OrderNumber OrderNumberFormatted |
uses SONP order number (numerical portion) and formatted number (with prefix / suffix) |
Shipment Tracking | tracking_provider * tracking_number * date_shipped tracking_id formatted_tracking_provider * formatted_tracking_link * |
tracking info will be nested in a Package tag, grouped within a ShipmentTracking tag.* Will use custom providers if set |
WooCommerce Subscriptions ** | N/A | Can export subscription or renewal orders only |
Refunds
This plugin is also compatible with refunds while using the default export format (or if manually included in a custom format). Each order will display aRefundedTotal
field, which will display the total amount refunded in the order, as well as an Refunds
tag, which shows detailed refund data.
Each line item will also have Refunded
and RefundedQuantity
tags, which will display the total amount and quantity refunded for a particular item in the order.
** Subscriptions
Note that this plugin is compatible with Subscriptions, but is not a subscriptions exporter. When Subscriptions is active, you can choose to export subscription or renewal orders only as a sort of filter on which orders to export. This does not export subscription data for you to then import your subscriptions into a new site.Incompatible Plugins
↑ Back to top- Product Add-ons is not fully compatible with this export plugin. While add-on data will be displayed in line item meta when exported, dedicated compatibility to show add-ons separately for each line item will not be included. You can see more in this FAQ.
Troubleshooting
↑ Back to topExports Remaining Queued
↑ Back to top- Are you using a maintenance mode or blocking plugin? For example, the “Airplane Mode” plugin for developers will block HTTP requests. Please disable the maintenance mode plugin to process exports.
- Likewise, as HTTP requests are being made, your site domain must match your server IP address. This one really only relates to the developers: if you’re using a hosts file for a domain, make sure it’s on your server as well so the plugin can use it.
- Similarly, if your site is behind BasicAuth, background requests will fail to complete. For example, WP Engine staging sites often use basic authentication to block site access (you see a popup for credentials when you try to access the site): Please see the notes here to correct this issue, or disable basic authentication while testing exports.
- Finally, some hosts will block the requests from servers to themselves. You can test this by going to WooCommerce > Status > Tools. The plugin will add a tool called “Background processing test”, which will simulate the export process:
Slow exports or out-of-memory errors
↑ Back to topdefine( 'WP_USE_EXT_MYSQL', false );
to your wp-config.php
file.
With the introduction of the database data store in v2.4.0, the plugin now defaults to streaming exports to their destination whenever possible, rather than sending an entire file at once. This increases server efficiency and reduces the likelihood of out-of-memory errors, especially when downloading very large exports. This new feature requires the MySQLi extension to be enabled and be used by WordPress.
Other Issues
↑ Back to top- Having trouble adding custom meta fields? Please ensure your meta keys are correct.
- Custom format not working? Please ensure that “custom” is selected for the desired export to put your custom column mapping in action.
- If this is a different issue with automatic exports, please:
- Check that your FTP, HTTP POST, or email information is correct
- Double-check that your Export settings are correct 😉
- Review our Export Schedules section, which explains the most common scheduling issues, along with our information on testing procedures.
- Turn on the error log and review it under WooCommerce > System Status > Logs. If this doesn’t help you resolve the issue, submit a support ticket, with the log as an attachment.
Frequently Asked Questions
↑ Back to topQ: Will exported orders also show refunded totals? A: They can, but only if you’re using one of the default format (or a custom format that includes refunds). See our info on refunds for more information.
Q: Can I export the custom fields I have created with the Checkout Field Editor extension? A: Yes, you can! As of Checkout Field Editor version 1.4.6, native support for the Customer / Order XML Exporter is included in Checkout Field Editor. If you use a default or custom order export format as of XML Export v2.0+, only the Checkout Field Editor custom fields are added to the export in a “prettified” way.
Q: How do I remove the Export Status column on the orders page? A: You can easily hide this column (and any columns on your Orders / Products pages!) by going to “Screen Options” at the top right of your page. While viewing the Orders page, you’ll see that the “Export Status” is enabled. If you disable it, this will remove the corresponding column from your Orders screen. This is a neat trick to customize your Order and Product administration no matter what plugins are installed.
Q: Can I separate Product Add-ons in the XML so they’re easier to find? A: The way Product Add-ons are stored on orders makes it almost impossible to accurately get all add-ons for an order, so we don’t plan to add compatibility for this to the XML Exporter. However, we do have a custom code snippet available that should work for most stores, depending on whether your add-ons use special characters or not. To use this, please be sure you know how to properly add custom code to your site and that you test the export format with the snippet added.
Q: Is it possible to change the character encoding or XML version? My site uses special characters. A: Yep! Most every site should be okay with the defaults, but if you need to filter the character encoding, standalone definition, xml version, or other format definitions, you can use the
wc_customer_order_xml_export_suite_format_definition
filter — here’s an example snippet to get you started.