How to Export WooCommerce Orders to CSV or XML
To export your orders, go to WP All Export › New Export and select WooCommerce Orders. Next, drag and drop from right to left to build your export file. Then simply run the export and download your WooCommerce orders export.
Step 1: Select WooCommerce Orders for Export
Go to All Export › New Export and choose to export WooCommerce Orders. Click Customize Export File to continue.
Step 2: Customize Your WooCommerce Orders Export
All of the order export data can be found in the Available Data section. Drag and drop the desired fields from right to left to configure your export file.
Available Export Fields in WooCommerce Orders
The available export fields are categorized into the following sections: Order, Customer, Items, Taxes & Shipping, Fees & Discounts, Notes, Refunds, Custom Fields, and Other.
Order Data Section
Basic 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
Customer Data Section
Customer order information is found under 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
Items Data Section
Products purchased in each order 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 the exported 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 Section
Tax and shipping information is found under 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 Section
Data related to fees and discounts are found in Available Data › Fees & Discounts:
- Discount Amount (per coupon): Total amount discounted for each used coupon. Multiple values are separated by a pipe character |, for example
-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): Multiple values are separated by a pipe character. 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
Notes attached to the WooCommerce order 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.
Refunds applied to an order appear in the Available Data › Refunds. Multiple refunds are separated by a pipe character:
- 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 the order 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 fields attached to the order would 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: Wether 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
Advanced Order Options when Exporting
Control various settings related to the export file in the Advanced Options section. These options vary depending on the export file type, such as CSV, Excel, XML, etc.
Advanced CSV export options:
- Include header row and column titles in export: When enabled, the first row is header with column titles. When disabled, the first row is the first order with no header or column titles.
- Display each product in its own row: When enabled, orders with multiple products will export with each product in its own row, with each order spanning over many rows. When disabled, each row will contain an order, with all of the product data separate with pipe characters.
- 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 data listed once. Subsequent rows will only contain data related to the product exported in that row.
Read our guide on exporting WordPress data to XML for info on advanced XML export options.
Step 3: Download Your Exported WooCommerce Orders
Once the export is set up as needed, click Continue and verify the export settings. Click Confirm & Run Export to run the export.
After the export has completed, click CSV or XML to download the exported orders. The Bundle is a zip file that contains the export file and an import template, which allows migrating those orders into another site using WP All Import.
Here's an example file with a sample of exported WooCommerce orders: