WooCommerce Customer / Order / Coupon Export

Overview ↑ Back to top

The WooCommerce Customer / Order / Coupon Export extension lets you export your site’s customers, orders, or coupons to a CSV or XML file. Here are a few of the features offered by this plugin to make it easier to manage your site’s data:

  • Export customers, orders, or coupons, in CSV or XML format, individually or in bulk.
  • Create your own custom formats to determine which fields are included and where they’re positioned.
  • Automatically export and send your file to a remote server via FTP, HTTP POST, or email, such as to your fulfillment service.
  • Exports run asynchronously in the background, meaning you can export thousands of records while you complete other tasks – or take a well-earned break!
Want to export orders to the Stamps.com desktop client? Check out the Stamps.com XML File Export extension instead!

Requirements ↑ Back to top

  • PHP 5.6+ (you can view this under WooCommerce > Status)
  • WooCommerce 3.0.9+
  • Your site must support background processing to use automated exports or process exports in the background of your site. Click here to learn more about this requirement.

Installation ↑ Back to top

  1. Ensure your store meets the plugin requirements.
  2. Download the extension from your WooCommerce dashboard.
  3. Go to Plugins > Add New > Upload and select the ZIP file you just downloaded.
  4. Click Install Now and then Activate.
  5. That’s it! You’re all set. Keep reading this documentation to learn more about exporting customers, orders, and coupons from your site!

Export data manually ↑ Back to top

You can export customers, orders, and coupons manually at any time. When you begin a bulk export or export items from the Orders or Users lists, a modal will appear to let you know the export is processing:

Export started modal

If you leave this modal open while the export processes, you can download the file via that modal:

Export complete modal

However, since customer and order exports are processed asynchronously in the background on your site, you can feel free to close the modal or leave your site completely while the export runs. This lets you keep working while your export processes behind the scenes. Exports are batch-processed, which allows your site to process an export for thousands of records without timing out.

If you leave the export modal, you can download the file from an admin notice that will appear when the export is ready or by going to WooCommerce > Exports > Export List, where we store exports for 14 days.

Export list

Note: If your site does not support background processing, your site is incapable of processing the export in the background. That means you’ll need to leave the export modal open while the export processes. Click here to read more about background processing and how to resolve this issue.

Exporting data in bulk ↑ Back to top

To manually export data in bulk:

  1. Go to WooCommerce > Export.
  2. On the Manual Export tab, update the following settings:
    • Output type: Choose to export your file in CSV or XML format.
    • Export type: Choose whether to export orders, customers, or coupons.
    • Format: Select a predefined or custom format.
    • Filename: Enter a name for the file generated by this export.
    • Mark as exported: Enable to ensure the exported data is excluded from future exports. Click here to learn more about this setting.
    • Batch processing: Only enable if your site does not support background processing.
  3. Settings for manual bulk exports

  4. Update the Export Options section to target particular orders (and include order notes), customers, or coupons. The available options will change based on your selected Output type.
  5. If you have WooCommerce Subscriptions activated on your site and you’re exporting orders, you can also choose to export subscriptions orders only.
  6. Click Export.

Options for manual bulk exports

You can download the export file as explained above.

Exporting data from the Orders list ↑ Back to top

You can export one or more orders from the Orders page by following the steps below:

  1. Go to WooCommerce > Orders.
  2. Select one or more orders to export. You can set the Exported filter to show orders based on their export status.
  3. Selecting orders to export

  4. From the Bulk Actions menu, choose one of the following actions:
    • Download to CSV
    • Download to XML
    • Export and Send: Export the selected orders and send them via FTP, HTTP POST, or email.
  5. Export bulk actions

  6. Click Apply.
    • If you selected an immediate download (e.g. Download to CSV or Download to XML), you can retrieve the download file as explained above.
    • If you chose Export and Send, you’ll be prompted to select one of your automated order exports so the same transfer method can be used to send this export. Only automated order exports with FTP, HTTP POST, or email transfer methods can be selected for this type of export.
    • Export and send settings for orders

Once an order is exported from the Orders page, it will be marked as exported. This will prevent the order from being included in future automated exports. Click here to read more about this setting and how to change it.

Exporting data from the Users list ↑ Back to top

You can export one or more customers (i.e. users that have made at least one purchase) from the Users page by following the steps below:

  1. Go to Users and select one or more customers to export.
  2. From the Bulk Actions menu, choose one of the following actions:
    • Download to CSV
    • Download to XML
    • Export and Send: Export the selected customers and send them via FTP, HTTP POST, or email.
  3. Exporting customers in bulk

  4. Click Apply.
    • If you selected an immediate download (e.g. Download to CSV or Download to XML), you can retrieve the download file as explained above.
    • If you chose Export and Send, you’ll be prompted to select one of your automated order exports so the same transfer method can be used to send this export. Only automated customer exports with FTP, HTTP POST, or email transfer methods can be selected for this type of export.

Export and send settings for customers

Once an order is exported from the Users page, it will be marked as exported. This will prevent the customer from being included in future automated exports. Click here to read more about this setting and how to change it.

Export data automatically ↑ Back to top

If your site supports background processing, you can create one or more automated exports to send customer or order export files on a recurring basis.

Before you get started, please read the following notes about automated exports:

  • Orders placed / customers created before activating this plugin will not be automatically exported. They can, however, be marked as exported if you’d like.
  • Only items marked as not exported will be included in automated exports. Click here to learn more.
  • Exports are scheduled in your WordPress site’s timezone. You can find your timezone settings under Settings > General.

Create an automated export ↑ Back to top

You can create an automated export by following the steps below:

  1. Go to WooCommerce > Export > Automated Exports and click Add New.
  2. Add new automated export

  3. Update the following settings for the automated export:
    • Enabled: Turn the automated export on or off.
    • Export name: Enter an internal name for the export.
    • Output type: Choose to export your file in CSV or XML format.
    • Export type: Choose whether to export orders, customers, or coupons.
    • Filename: Enter a name for the files generated for the export.
    • Format: Select a predefined or custom format.
  4. Automated export settings

  5. Update the Trigger automated export setting to determine when the export will run. Click here to read more about scheduling.
    • You can run order exports as orders or paid or on set intervals.
    • You can only run customer exports on set intervals.
  6. Update the Method setting to determine how the export will be sent / transferred. Click here to read more about transfer methods.
  7. Scheduling automated exports

  8. If you’re exporting orders, you can update the Export Options section to target particular orders and include order notes.
  9. Click Save.

Automated export options

You can return to the Automated Exports tab to view and manage your automated exports.

Export schedules ↑ Back to top

This plugin relies on WP-Cron (the established way of performing recurring tasks within WordPress) to schedule automated export jobs. Unfortunately, the WP-Cron system is not always perfectly accurate – it requires constant traffic to your site to trigger events at the right times, which can be difficult for sites with less traffic.

There are two workarounds for this accuracy issue:

  • Setup a real system cron on your server that ensures WP-Cron is triggered every minute. Click here to learn about setting this up. Your hosting provider should be able to help with this workaround, which would be ideal since it’s guaranteed to solve the issue with random times.
  • Use a service (e.g. Pingdom or UptimeRobot) to ping your site every few minutes. This will ensure WP-Cron fires regularly.

Export transfers ↑ Back to top

Transfer methods

There are four methods you can use to transfer automated exports:

Note: When you choose to Export and Send data from the Orders or Users pages, you’ll be prompted to select an automated export. The plugin will then use that export’s transfer method settings to send the exported data.

The FTP, HTTP Post, and Email methods include a test feature that you can use to confirm that everything is setup properly before activating the automated export.

Testing automated export transfers

Locally

Exports transferred locally are available for 14 days in the Export List. There’s no special setup required for this transfer method.

FTP

To transfer via FTP, you’ll need to update the following settings:

  • Server address: Enter an IP address or hostname for the FTP server.
  • Username
  • Password
  • Port: Enter “21” for regular FTP, “22” for SFTP, or “990” for FTP with Implicit SSL.
  • Initial path: Enter the initial path for the FTP server without a leading slash and with a trailing slash. If you’re connecting via SFTP, the initial path should be the full path of the folder if your username doesn’t default to the HOME directory.
  • Security: Choose your FTP server’s security.
  • Passive mode: Enable to turn on passive mode for FTP connections. This should be disabled unless you are having issues connecting, especially if you’re seeing the PORT command successful message followed by a timeout in the error log (WooCommerce > Status > Logs).
Don’t know your FTP settings or credentials? Get in touch with your FTP provider to confirm any details you aren’t sure about.

HTTP POST

To transfer via HTTP POST, you’ll need to enter the HTTP POST URL where the export file should be sent. This is a great option for sending files to Zapier.

Email

To transfer via email, you’ll need to update a few settings:

  • Recipient(s): Enter one or more (comma-separated) emails that should receive the export. If left blank, the export will send to the site admin’s email address, which is shown in the field’s tooltip and can be edited by going to Settings > General.
  • Email subject: Set a subject line for the export email to help recipients identify the export file.

Transfer monitoring

When you configure automated exports, the plugin will track the transfer status of each export under the Export List. If a transfers fail, any site user who can manage WooCommerce (typically admins and shop managers) will be notified via admin notice.

Notices for failed export transfer

If several failures occur consecutively, an admin notice will recommend checking out the logs and export settings to ensure the automated export is setup properly.

Marking data as exported ↑ Back to top

Because this plugin supports manual and multiple automated exports, it’s important to consider what will happen to an order or customers after export. This is especially important for stores that send automated exports to external sources. You wouldn’t want to include the same order in multiple automated exports to your fulfillment center, but you also wouldn’t want to exclude that order from an automated export if you exported the order manually for some other purpose.

To give you complete control over what data are included / excluded from your exports, we’ve included the ability to change export status (i.e. whether an item was exported or not) both at a global level (e.g. impacts all your exports) or for individual automated exports.

What happens when something is exported? ↑ Back to top

When you manually export an order or customer, it is marked as exported and will be excluded from all future automated exports. However, the order or customer will be included in future manual exports. If you do not want your manual export to impact future automated exports, be sure to disable the Mark as Exported setting before exporting.

When you automatically export an order or customers, it is marked as exported for that automated export and will be excluded from future runs of that automated export only. This prevents you from sending the same order over and over again to your fulfillment center.

How can I change whether something is marked as exported? ↑ Back to top

You can mark orders / customers as exported or not exported from a few locations.

  • Orders or Users lists. Use the Mark as Exported or Mark as Not Exported bulk actions to change the export status for the selected objects. This will change the export status for all exports.
  • Marking orders or customers as exported

  • Order detail or User detail pages. Select a specific order or user to toggle the export status at a global level (i.e. impacts all exports) or for one or more automated exports. This lets you determine whether an order or customer should be included in particular future automated exports.
  • Exported by fields in order

Note: Changing the export status to “not exported” is not a permanent change. This status will revert if the order or customer is included in a future export, as defined here.

Export formats ↑ Back to top

We offer several predefined formats, but you can also create your own custom format to ensure the file format meets your exact specifications.

Note: While we do our best to not change column ordering in our default formats, we strongly recommend not relying on column ordering, since any changes we must make will break integrations that rely on a specific order. Instead, we recommend using the column names / IDs, which are guaranteed to never change.

Predefined formats ↑ Back to top

You can use one of our predefined formats to export your customers, orders, and coupons. The CSV Import formats are compatible with our Customer / Order / Coupon CSV Import Suite plugin.

Customer exports

Order exports

Coupon exports

Note: You can download our sample CSV files from Google Sheets by clicking File > Download as > CSV or make a copy to your own Google Sheets to modify by clicking File > Make a Copy.

Create custom formats ↑ Back to top

You can create multiple custom export formats, which are useful if you need to rearrange, remove, or add columns to your export. Custom formats can be used in your manual or automated exports.

Custom CSV format

Follow the steps below to create a custom CSV export format:

  1. Go to WooCommerce > Exports > Custom Formats.
  2. Select the export type you want to create – Orders, Customers, or Coupons.
  3. Click Add new CSV format.
  4. Create new custom CSV format

  5. Select an existing format to use as a starting point for your custom format and click Load, or click X to start from scratch.
  6. Update the Format Options:
  7. If you are creating an orders export format, you can also update the following extra options:
    • A row represents: Choose whether a row should represent a single order or a single line item (e.g. an order with multiple line items will span multiple rows).
    • Item columns should use: Choose whether items columns (e.g. line items) should be pipe-delimited or JSON format.
      • JSON example: typically used in the predefined CSV Import format for orders – [{"product_id":99,"product_name":"Woo Album","quantity":1,"total":19.99}]
      • Pipe-delimited example: typically used in the predefined Default CSV format for orders – product_id:99|sku:woo-album|name:Woo Album|quantity:1|total:19.99
  8. Update the Column Mapping to determine which fields will appear on your export.
  9. Click Save.
  10. Custom CSV format settings

Custom XML format

Follow the steps below to create a custom XML export format:

  1. Go to WooCommerce > Exports > Custom Formats.
  2. Select the export type you want to create – Orders, Customers, or Coupons.
  3. Click Add new XML format.
  4. Create new custom XML format

  5. Select an existing format to use as a starting point for your custom format and click Load, or click X to start from scratch.
  6. Update the Format Options:
    • Name: Enter an internal name for your export format.
    • Indent output: Enable to pretty print the XML output with indents, which is helpful if a human is reading the file but unnecessary otherwise.
    • Include all meta: Choose whether to include all meta in the export. Click here to learn more about adding meta to exports.
  7. Update the Column Mapping to determine which fields will appear on your export.
  8. Click Save.
  9. Custom XML format settings

Adding custom meta

You can add columns for order, coupon, or user meta to custom formats.

To add custom meta, select “Meta field…” from the Data source drop-down menu and enter the Meta key.

Adding custom meta to export

You must know the correct meta key for the data when adding a column for meta. If you’re not sure, running an export with the Include all meta setting enabled will include all meta keys, so you can use that to find the meta key you want to include in your custom format going forward.

Note: While this plugin can export order metadata, it cannot export metadata for line items. Line item metadata can only be added as a single column when the A row represents setting is configured to “A single line item” and the item meta key is added to the column list.

Adding static values

You can add columns for static values to custom formats. You can use this feature to add blank columns or columns with a set value for all rows (e.g. your store’s name).

To add a static value, select “Static value…” from the Data source drop-down menu and enter the Value.

Adding a static value to a custom format

Compatible plugins ↑ Back to top

This is a list of plugins (though not an exhaustive one!) that are known to be compatible with WooCommerce Customer / Order / Coupon Export. Columns are automatically added for plugins in this list; they are compatible out-of-the-box.

Note: Just because a plugin is missing from this list doesn’t mean it’s incompatible! You can also consult our developer documentation for compatibility with other extensions.
Extension CSV Fields XML Fields Notes
Admin Custom Order Fields admin_custom_order_field_[column name/ID]
(value / option for custom field)
CustomFields
– ID
– Name
– Value
AvaTax vat_id (customer VAT ID)
tax_exemption (customer tax exemption status)
VATid(customer VAT ID)
TaxExemption(customer tax exemption code)
Checkout Add-ons checkout_add_on_[add-on name/ID] (add-on value)
checkout_add_on_total_[add-on name/ID] (add-on cost)
CheckoutAddOns
– ID
– Name
– Value
– Cost
Checkout Field Editor field_name CheckoutFields
– FieldName
Column name generated from field name
Cost of Goods order_cost_total
total_cost
item_cost
OrderCostTotal
LineCostTotal
ItemCost
Customer / Order / Coupon CSV Import Suite N/A N/A Use CSV Import formats
Sequential Order Numbers Pro order_number
order_number_formatted
OrderNumber
OrderNumberFormatted
Uses SONP order number
Shipment Tracking tracking_provider
custom_tracking_provider
custom_tracking_link
tracking_number
date_shipped
tracking_ID
formatted_tracking_provider
formatted_tracking_link
tracking_provider
custom_tracking_provider
custom_tracking_link
tracking_number
date_shipped
tracking_ID
formatted_tracking_provider
formatted_tracking_link
When this plugin is activated, these fields will be automatically added within a shipment_tracking field (CSV) or ShipmentTracking tag XML
Subscriptions N/A N/A Can export subscription or renewal orders on the Export tab. This plugin does not export subscriptions data that you can import elsewhere!

Frequently asked questions ↑ Back to top

Q: Can I export refunds?
A: Yes! This plugin is compatible with refunds while using one of the predefined formats or custom formats if the following fields are added:

  • refunded_total: The amount refunded in the order
  • Item_refunded: The total refunded for a particular item in the order

Q: There are users missing from my customer export. Where are they?
A: Users must place at least one order before they will be considered “customers” and included in this export.

Q: Can I duplicate columns in my custom export format?
A: No, we automatically remove all duplicate sources because columns are used as keys for the column headers.

Q: Can I remove the Export Status column from the Orders or Users pages?
A: Sure thing! You can hide this column (and many others!) by going to the Screen Options pages at the top of these screens.

Enabling the Export Status column

Background processing ↑ Back to top

Q: How can I tell if my site supports background processing?
A: Go to WooCommerce > Status > Tools and run the Background Processing Test. If your site fails this test, please contact your host to enable background processing / loopback connections. While some hosts may identify this as a security issue, there’s no threat to using loopback connections and, if done properly, it won’t increase server usage. Quality hosts will mitigate increased server usage with rate limiting.

Q: My site doesn’t support background processing – do I need this to use the plugin?

A: Strictly speaking, no – you can still run exports without background processing enabled for your site.

However, background processing is required to run automated exports. Additionally, without background processing, you can’t leave the export modal while running a manual export. So while it’s not required, we highly recommend it for the best experience with this plugin!

More importantly, many current and upcoming features in WooCommerce need loopback connections to function. For example, the database updater (already in use) and future plans for backgrounded email sending, both of which uses the same type of background processing (and requires loopback connections). It’s essential that a host for an eCommerce site support this.

Excel display issues ↑ Back to top

Q: Why are leading zeros (e.g. in a ZIP code) missing from my Excel export?
A: By default, Excel hides leading zeros. This is most common with ZIP codes like “02111” – Excel will automatically hide the first zero and display “2111”. However, the zero is included in the export – you can force Excel to show this by formatting the column as “Text”.

Q: Why are the foreign / special characters not displaying correctly in Excel?
A: We’ll need to force Excel to use UTF-8 encoding to render these characters properly by adding this snippet to your site – please be sure you know how to safely add custom code to your site before adding this snippet:

add_filter( 'wc_customer_order_csv_export_enable_bom', '__return_true' );

Note: Excel for Mac doesn’t support UTF-8 characters, so your exports may not display accented or special characters properly. We recommend using a different application, such as:

Q: How can I ensure that Excel won’t show all my data in one column?
A: It sounds like your computer is setup to use a different delimiter than the standard comma. In most cases, the alternative delimiter is a semicolon. You can change delimiters in your export format.

XML format questions ↑ Back to top

Q: Can I separate Product Add-Ons in the XML file so they’re easier to find?
A: Unfortunately, the way that Product Add-Ons are stored on orders makes it nearly impossible to accurately get all add-ons for an order, so we do not support this for XML exports. However, we do have a code snippet available that should work for most stores, but please be sure you know how to safely add custom code to your site and test this thoroughly!

Q: Can I change the character encoding or XML version? My site uses special characters.

A: Absolutely! The defaults should work for most sites, but if you need to filter the character encoding, standalone definition, XML version, or other format definitions, you can do so using the wc_customer_order_export_suite_format_definition filter. Here’s a sample snippet to get you started – please be sure you know how to safely add custom code to your site before installing this snippet!

Troubleshooting ↑ Back to top

Here are a few common troubleshooting topics that we’re addressing in this section:

Incompatible plugins ↑ Back to top

There are a few plugins that are incompatible with this plugin:

  • Product Add-Ons: While add-on data will be displayed in line item meta when exported, the plugin does not show add-ons separately for each line item.
  • WooCommerce Bookings: Version 1.10.0+ changed the way booking data is related to an order. Because booking data are no longer part of the order or order item data, bookings won’t be exported automatically.

Exports remaining queued ↑ Back to top

If your exports freeze without completing, your site may be blocking HTTP requests in some way. Exports are processed asynchronously in the background, which requires your site to make requests to itself for information. As such, your site cannot block HTTP requests or exports will not start processing.

Here are some common causes of blocked requests:

  • If your site is hosted with WordPress.com, the options table may be too limited. When setting up WooCommerce on WordPress.com, the site database must be updated; sometimes the options table limit is outdated at 64 characters when it should be 255 characters (as of WordPress 4.4). This limit should be fixed so that export jobs save properly. If WordPress.com confirms that the limit is 255 characters, please get in touch with our support team.
  • Using a maintenance mode or blocking plugin. For example, the Airplane Mode plugin for developers will block HTTP requests.
  • Your site is behind BasicAuth, which will require you to login before you can visit the site. This prevents background requests from completing. For example, WP Engine staging sites often use basic authentiacation to block site access. Click here to learn about correcting this issue, or disable BasicAuth while testing exports.
  • Your site host blocks requests from servers to themselves, called loopback connections. Click here to learn more about this requirement and how to test for this.

Basic authentication sign in

Slow exports / out-of-memory errors ↑ Back to top

If your exports are slow or you’re encountering out-of-memory errors, please contact your host to confirm that the MySQLi extension is installed on your server and used by WordPress.

Customer / Order / Coupon Export defaults to streaming exports to their destination instead of sending an entire file to improve server efficiency and reduce the likelihood of out-of-memory errors with very large exports. This feature requires the MySQLi extension to be enabled and used by WordPress.

In rare cases, the extension is installed but not being used by WordPress. This can be remedied by adding define( 'WP_USE_EXT_MYSQL', false ); to your wp-config.php file.

Other issues ↑ Back to top

Having difficulty with the plugin?

  • Please ensure your site meets the plugin requirements.
  • Check the FAQs to see if they address your question.
  • Having trouble adding custom meta fields? Please ensure your meta keys are correct.
  • Having a problem with an automated export delivery?
    • Confirm that your FTP, HTTP Post, or email information is correct.
    • Run a test to see if the transfer method is working properly.
    • Review our section on export schedules to see if there might be any issues with your export schedule.
    • If you encounter the following error when exporting via FTP – Error message: Uncaught Error: Call to undefined function ftp_connect() check phpinfo() to ensure that your server’s PHP has FTP support enabled.
  • If you’re experiencing a different issue, please turn on and review error logs under WooCommerce > System Status > Logs and get in touch with support if this doesn’t help you identify the problem.

Questions & support ↑ Back to top

Have a question before you buy? Please fill out this pre-sales form.

Already purchased and need some assistance? Please check out our troubleshooting tips and frequently asked questions for common issues or contact support via the help desk if you need more help.

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top