How to Export WooCommerce Orders to CSV, Excel, or XML
To export orders, go to WP All Export › New Export and select WooCommerce Orders. Use the drag and drop tool to build the order export, then run the export and download the file.
Step 1: Create a New Export for WooCommerce Orders
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.
WP All Export 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, 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
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, it's 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
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,
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 other 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,
Step 3: Download Your WooCommerce Order Export
Once the export is set up, click Continue and verify the export settings. Click Confirm & Run Export to run the export.
After the export has been 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 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).
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, 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 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.
Frequently Asked Questions About Exporting Orders
How to 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.
To learn more, see Exporting WooCommerce Orders.
How to 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.
For additional details, see Export WooCommerce Orders.
How to Export All Orders?
Just run a standard order export as described in this article. If you do not apply any filters, 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 to 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 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 Tour page for relevant features and a video overview.
How to 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 to Schedule WooCommerce Order Exports?
WP All Export 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 to Transfer Orders?
To transfer orders from one WooCommerce website to another, use the same process used for migrating WooCommerce orders. That process requires WP All Export on the source site and WP All Import on the destination site.
See Migrating WooCommerce Orders for additional information.
What Table Does WooCommerce Store Orders In?
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.
Export WooCommerce products into a CSV or XML file with WP All Export.
Export your WooCommerce reviews using WP All Export.