How to Export WooCommerce Orders to CSV, Excel, or XML
To export orders, go to All Export › New Export and select WooCommerce Orders as the export post type. Use the Drag & Drop tool to build the order export, then run the export and download the file.
Table of Contents
- Step 1: Create a New Order Export
- Step 2: Select Your Order Export Columns
- Step 3: Configure the Export Settings
- Step 4: Download Your Export File
- Exporting Orders to Different File Types
- Advanced Order Export Options
- Filtering WooCommerce Order Exports
Step 1: Create a New WooCommerce Order Export
Go to All Export › New Export and choose to export WooCommerce Orders. Click Customize Export File to continue.
Step 2: Select Your Order Export Columns
Most WooCommerce order exports require only a subset of the order columns.
Our plugin lets you choose your columns using a simple Drag & Drop interface.
All of the relevant order tables and fields are listed in the Available Data section on the right. To include a field as a column in the order export file, simply drag the field into the column selection area:
To remove a column, drag it out of the selection area and drop it on another part of the interface.
WooCommerce Order Export Fields
The available export fields are categorized into the following sections: Order, Customer, Items, Taxes & Shipping, Fees & Discounts, Notes, Refunds, Custom Fields, and Other.
WooCommerce Order Data
Basic WooCommerce order information is found under Available Data › Order.
- Order ID: The Order ID as assigned by WordPress.
- Order Key: An order code used to differentiate orders within WooCommerce.
- Order Date: The date when the order was placed, in Y-m-d H:i:s format.
- Completed Date: The date when the order was completed, in Y-m-d H:i:s format.
- Title: The order's title.
- Order Status: The order's current status. The possible WooCommerce order statuses are
- Order Currency: The currency in which the order was placed, for example,
- Payment Method Title: The name of the payment method chosen by the client, for example,
- Order Total: Total amount the client has to pay, for example,
WooCommerce Customer Data
Customer information for WooCommerce orders is located in Available Data › Customer:
- Customer User ID: If the customer is registered on the site, this exports their numerical WordPress user ID. If it's a guest customer, it exports
- Customer Note: Notes left by site administrators about the customer.
- Customer Account Email Address
Every customer in WooCommerce has a billing address and a shipping address added as custom user meta. Both sets of addresses are organized in the same way:
- First Name
- Last Name
- Address 1
- Address 2
WooCommerce Order Items
The products purchased in WooCommerce orders are found in Available Data › Items.
- Product ID: The post ID of the product, automatically assigned by WordPress. For variable products, this would be the post ID of the variation purchased, not the parent product.
- SKU: The product code used to reference and differentiate products.
- Product Name: The product's name or the parent product for variations.
- Product Variation Details: If the product has variations, this exports its attribute's name (in the column header) and its attribute's value; if there are multiple attributes on a single product, each attribute gets its own column.
- Quantity: Amount of items ordered.
- Item Cost: Cost per item.
- Item Total: Item cost multiplied by quantity, which is the total amount for each purchased item(s) without taxes or shipping.
- Item Tax: Total tax for the item(s).
- Item Tax Total: Total tax for the item(s).
- Item Tax Data: Exports a serialized array that contains the subtotal and total tax. When empty, exports an empty serialized array such as
- Order Line ID: A numerical, incrementing ID assigned to all orders. Similar to post IDs.
- Order Line Title: Every product in an order is a line item. The Line Title is the product name.
The Items section has several subsections where you can find all information related to the products contained in WooCommerce orders: Product Data, Taxonomies, Custom Fields, Attributes, and Advanced.
The following is a list of the important, most commonly used fields. Read more about these fields and others in our walkthrough on how to export WooCommerce products.
- Product Data
- Post Type
- Regular Price
- Sale Price
- Stock Status
- External Product URL
- Total Sales
- Product Type
- Product Visibility
- Product categories
- Product tags
- Custom Fields
- Product Color
- Product Size
- Purchase Note
- Tax Class
- Tax Status
WooCommerce Order Taxes & Shipping
Tax and shipping information for WooCommerce orders is located in Available Data › Taxes & Shipping:
- Rate Code (per tax): This is the slug of the tax rates assigned to the ordered product.
- Rate Percentage (per tax): Percentage amount to be taxed. Exports a numerical value such as
21.0000. Adding this export field also adds the Rate Name export field.
- Amount (per tax): Tax amount per tax applied. Multiple values are separated by a pipe character |.
- Total Tax Amount: Total tax amount to be charged. If there's no tax, exports
- Shipping Method: Shipping method selected by the customer.
- Shipping Cost: Total cost for the shipping.
- Shipping Taxes: Exports a serialized array with the total shipping taxes, for example,
WooCommerce Order Fees & Discounts
Data related to fees and discounts are found in Available Data › Fees & Discounts:
- Discount Amount (per coupon): Total amount discounted for each used coupon. A pipe character | is used to separate multiple values, e.g.,
-18.91|-3.78. Exporting this field also adds the Coupon Code export field.
- Coupons Used: Coupon codes used in this order. Multiple values are separated by a pipe character |, for example,
- Total Discount Amount
- Fee Amount (per surcharge): Again, a pipe character is used to separate multiple values. This field also adds the Fee Name export field.
- Total Fee Amount: Total amount of fees being charged to the order.
- Fee Taxes: Exports a serialized array with the total fee taxes, for example,
WooCommerce Order Notes
Notes attached to WooCommerce orders are found in Available Data › Notes. Multiple notes on the same order are separated by a pipe character:
- Note Content: Exports the note's content as a text string.
- Note Date: Exports the date when the note was made. Format Y-m-d H:i:s.
- Note Visibility: Exports the note's visibility. Either
- Note User Name: Exports the username of the note's author.
- Note User Email: Exports the email address of the note's author.
WooCommerce Order Refunds
Refunds applied to WooCommerce orders appear in the Available Data › Refunds. A pipe character is used to separate multiple refunds:
- Refund Total: Exports a numerical value with the total amount being refunded, for example,
0when there's no refund.
- Refund ID: The post ID of the refund, automatically assigned by WooCommerce when the refund is processed.
- Refund Amounts: The value of each refund applied to the order.
- Refund Reason: The reason for the refund. Exports a text string.
- Refund Date: Exports the date when the refund was done. Formatted in Ymd, for example,
- Refund Author Email: The email address of the user that made the refund.
Any information added as a custom field to WooCommerce orders appears in Available Data › Custom Fields:
- _date_paid: Exports a Unix timestamp of when the order was paid, for example,
- _date_completed: Exports a Unix timestamp of when the order was completed.
Other Order Fields
Other fields attached to WooCommerce orders appear under this section. This is an incomplete list with the most relevant export fields:
- Tax Class: Exports the slug of the tax class associated with the ordered item, for example,
- Prices Include Tax: Whether the prices include the tax or not. Exports
- Created Via: The system that created the order. Exports
- Payment Method: Exports the slug of the selected payment method, for example,
Once the order export is set up, click Continue to configure the export settings.
Step 3: Configure the Export Settings
In this screen, you can set advanced options that include the following:
- How the export should behave if it is re-run in the future. For example, should it only export orders that have been created or modified since the previous export? Should it create a new file every time the export is run?
- Whether to split large order exports into multiple output files.
- The batch processing size for the export.
- ...and so on.
You can also create a schedule to run the order export every week or month.
For now, leave these settings with their default values and click Confirm & Run Export.
Step 4: Download Your Export File
Click Confirm & Run Export to run the export.
After the export has completed, click CSV to download the exported orders. Alternatively, you can click the Bundle option. This downloads a zip file that contains the export file and an import template that you can use to migrate WooCommerce orders to another site using WP All Import.
Here's an example file with exported WooCommerce orders:
Export WooCommerce Orders — Advanced Topics
Exporting Orders to Different File Types
In the preceding tutorial, we exported our orders to a CSV file by default. To change this to an Excel format, simply do the following in the Drag & Drop interface:
- Expand the Export Type panel near the bottom of the screen.
- Choose Spreadsheet as your main export type.
- Select your specific format (in this case, Excel File XLS or Excel File XLSX).
Want to export to XML instead?
- Expand the Export Type panel near the bottom of the screen.
- Choose Feed as your main export type.
- Select your specific format (in this case, Simple XML Feed or Custom XML Feed).
Advanced Order Export Options
The Advanced Options panel is found just above the Export Type panel:
This panel allows you to control various settings related to the export file. The options vary depending on the export file type. For CSV files and Excel files, they include:
- Display each product in its own row: When enabled, WooCommerce orders with multiple products will export each product in its own row, with each order spanning multiple rows. When disabled, each order will be exported in a single row, with all of the product information displayed in separate columns.
- Fill in empty columns: When enabled, orders that span multiple rows will have all order data duplicated for each row. When disabled, orders that span multiple rows will only have their data listed once. Subsequent rows will only contain data related to the product exported in that row.
CSV files also include:
- Include header row and column titles in export: When enabled, the first row is the header with column titles. When disabled, the first row is the first order with no header or column titles.
Read our guide on exporting WordPress data to XML for info on advanced XML export options.
Filtering WooCommerce Order Exports
Just as most WooCommerce order exports require only a subset of the available data columns, they may also require only a subset of the orders. This subset can be based on date ranges, geographic locations, or any other order-related fields.
To select a subset of your orders, first expand the Add Filtering Options panel near the bottom of the New Export screen. To set a filter, you must select an Element, a Rule, and a Value:
In this case, we are setting:
Element = Order Date
Rule = equal to or newer than
Value = 01/01/2018
This is equivalent to saying, “Export WooCommerce orders with an order date equal to or newer than January 01, 2018.”
You can also combine multiple filter rules. For example, if you want to only export orders from last month, you can use these rules:
Since these are relative date rules, you won't have to update them each month. Learn more about the syntax you can use in date filters here: https://www.php.net/manual/en/datetime.formats.relative.php.
Export WooCommerce Orders — Frequently Asked Questions
If you are looking for information on our plugin, please see Export WooCommerce Orders.
How Do I Export WooCommerce Orders to a Spreadsheet?
- Navigate to All Export > New Export and create a new export.
- Select to export WooCommerce Orders.
- Choose to Customize Export File.
- Select Spreadsheet as your Export Type and choose one of the available spreadsheet formats.
- Download your exported spreadsheet with your WooCommerce orders.
How Do I Export Orders in Excel?
- Create a new export in All Export > New Export.
- Choose WooCommerce Orders from the dropdown list.
- Customize the export by setting up the export columns.
- Change the Export Type to Spreadsheet > Excel File.
- Run the export and download the WooCommerce orders in Excel.
How Do I Download Orders in CSV?
To download orders in CSV, just follow the steps in this tutorial, as CSV is our default export format.
How Do I Export a Specific Order in WooCommerce?
To export a specific order in WooCommerce, repeat the steps in this guide, but apply a filter that selects the order that you wish to export. Other than this, the process of exporting one order or many orders is the same.
How Do I Export All Orders?
Just run a standard order export as described in this article but do NOT apply any filters. If you do this, you will export all WooCommerce orders by default. If you have a large number of orders, split the export into multiple files in the Export Settings screen.
How Do I Export Order Details in WooCommerce?
To export order details in WooCommerce, expand the appropriate section in Available Data in the Drag & Drop screen, then just drag and drop the desired fields into the column selection area. For example, if you want to export the product details associated with an order, select fields from the Available Data > Items section.
How Do I Export Orders From WooCommerce for Free?
To export orders from WooComerce for free, use our base WP All Export plugin in combination with our Order Export for WooCommerce add-on. Note, however, that using the free version of these plugins does impose some limitations on you. For example, you can't export order data directly to Excel or export all WooCommerce order fields.
How Do I Schedule WooCommerce Order Exports?
Our plugin offers multiple options to schedule your WooCommerce order exports. You can either use cron jobs to manually schedule your exports from your server, or use our automatic service to directly schedule them from our interface.
To learn more about scheduling your order exports, see How to Schedule WordPress Exports.
How Do I Import Orders Into WooCommerce?
- Go to All Import -> New Import in the WordPress main menu.
- Specify how you want to import your orders (i.e., upload a file, use a URL, etc.).
- Select your import file and choose your import target (i.e., WooCommmerce Orders).
- Use the Drag & Drop interface to map incoming fields to your WooCommerce target fields.
- Run the import.
See our Import WooCommerce Orders for relevant features and a video overview.
How Do I Migrate Orders to Another Website?
- Export the orders that you wish to migrate.
- When downloading your export file, select the "Bundle" option instead of a CSV file. The bundle file contains settings data in addition to the export data.
- Upload the bundle file on the other site.
- WP All Import will automatically know how to import the orders based on the bundle file settings.
- Review your imported orders. This will complete your WooCommerce order migration.
See our Migration Overview page for additional information.
How Do I Transfer WooCommerce Orders?
Transferring WooCommerce orders means migrating them from one WooCommerce website to another, so see the preceding question.
What Table is Used to Store WooCommerce Orders?
WooCommerce stores orders as a custom post type, which means that you can find them in the wp_posts table. The order metadata is in wp_postmeta. However, WooCommerce also uses its own custom database tables for some item data, such as wp_woocommerce_order_items and wp_woocommerce_order_itemmeta.
What Add-Ons Do I Need to Export WooCommerce Orders?
To export WooCommerce orders, you need to have the WooCommerce Export Add-On active on your site, along with WP All Export.
Export WooCommerce Orders — Related Docs
Learn how to import WooCommerce orders.
Learn how to Migrate WooCommerce orders.
Export WooCommerce products to a CSV, Excel, or XML file.
Export your WooCommerce reviews to a CSV, Excel, or XML file.
Learn how to export WooCommerce Coupons.