DocumentationOrder / Coupon / Subscription Export Import Plugin for WooCommerceHow to Import and Export WooCommerce Orders

How to Import and Export WooCommerce Orders

This article explains how to Import and Export WooCommerce Orders by using Order /Coupon / Subscription Export Import plugin for WooCommerce. Please refer to the product page to know more about the plugin features.


The WooCommerce Order / Coupon / Subscription Import-Export plugin allows you to import orders from WooCommerce store as well as another e-commerce platform. It exports orders from WooCommerce store to the CSV/XML file. Under Order Import / Export tab, you can import/export/merge(update existing order) hundreds, even thousands, of orders using one file which saves your effort and time of manually adding order information.

For importing orders to your online store, you will need a CSV(Comma-Separated Values) or XML (Extensible Markup Language) file which contains information about mapping fields. You can create a CSV file by using a spreadsheet program, such as  Excel, or Google Spreadsheets. Save this file with extension .csv.  After entering all details about orders in the spreadsheet, you can import orders to your online store. With this plugin, you can also export order details as a CSV/XML file.

Order Import/Export tab

The plugin takes CSV/XML file as input. It maps each field of CSV/XML file to the field of a particular order.

For example, Order_id field gets mapped to the identification number of the order and the shipping_total field gets mapped to the total shipping cost of the order. If you want the plugin to work correctly, you must map headers of all of the column correctly and you must ensure that all of the fields you enter must be in the correct format.

Note: While importing, if there is any mistake in your import file, your order import may not work as expected. Also, the CSV Import file must be in UTF-8 format. For more information about UTF-8 encoding, read How to save CSV / Excel File as UTF-8 Encoded?

To get started you must have CSV/XML file. You can create the one or export the order to get the format of CSV, download Order Sample CSV.
You must enter the order details in CSV file in a structured format as given below:
  • The first row must contain the column headers which are used for mapping the fields. The details about the mapping field are given  below:
    Column HeadingExplanationAccepted value or format
    order_idIdentification number of the order Numerical
    order_numberNumber of the order Numerical
    order_dateDate of the order with time YY-M-D H:i:s
    e.g  2016-06-22 10:08:29
    statusStatus of the order Text e.g. processing, completed, etc
    shipping_totalTotal cost of shipping the order Numerical
    shipping_tax_totalTax applied on total shipping cost  Numerical
    fee_totalAn additional fee (any kind of charge) to order total  Numerical
    fee_tax_totalTax on total of fee  Numerical
    tax_totalTotal tax on the order  Numerical
    cart_discountDiscount on the cart amount  Numerical
    order_discountDiscount on the order amount  Numerical
     discount_totalTotal discount for the cart  Numerical
     order_totalOrder total after addition/deduction of tax/discount  Numerical
     refunded_total Total amount which is refunded  Numerical
     order_currency Currency of the order Text e.g. USD
     payment_methodpayment method used for paying the order amount Text e.g. COD
     shipping_method Shipping method used to ship the order Text e.g. Ground (UPS)
     customer_id Identification number of customer  Numerical
     billing_first_nameFirst name of the billing address Text
     billing_last_nameLast name of the billing address Text
     billing_companyCompany name of the billing address Text
     billing_emailThe billing email Text
     billing_phoneThe billing phone number Numerical
     billing_address_1The first line of the billing address  Text
     billing_address_2The second line of the billing address  Text
     billing_postcodeThe postcode of the billing address  Text
     billing_cityThe city of the billing address  Text
     billing_stateThe state of the billing address  Text
     billing_countryThe country of the billing address  Text
     shipping_first_nameFirst name of the shipping address  Text
     shipping_last_nameLast name of the shipping address  Text
     shipping_companyCompany name of the shipping address  Text
     shipping_address_1The first line of the shipping address  Text
    shipping_address_2 The second line of the shipping address  Text
     shipping_postcode The postcode of the shipping address  Text
     shipping_city The city of the shipping address  Text
     shipping_state The state of the shipping address  Text
     shipping_country The country of the shipping address  Text
     customer_note Note for the customer  Text
     wt_importkeyUsed to associate the subscription orders with the corresponding parent orders during the import Numerical
     shipping_itemsContains Shipping method name and total shipping cost  Method | Total e.g. method:2nd Day Air (UPS)|total:33.80
     fee_itemsContains name of the additional fee, total amount, and tax amount Fee name | Total | Tax
    tax_itemsContains tax code and total tax amount Tax code | Total e.g. code:US-V.A.T-1|total:1.69
     coupon_itemsContains Coupon code, description of coupon, and discounted amount Coupon code | Description | Amount
     order_notes List of order notes for the customers  Text
     download_permissions Shows if Order items are downloadable or not .1 : Downloadable
    0 : Non-Downloadable
     line_item_x Shows the details of line products which includes metadata also., SKU, quantity, total amount, refunded amount, meta attributes like color, tax, etc.
     e.g. name:Men’s Cotton T-Shirt | product_id:1001 | sku:B11V1 |
    quantity:1 |total:11.00|

    Each row contains the single order.

Import Orders

You can import orders from CSV/XML file or merge the orders with already existing orders by importing updated CSV file.

Navigate to Order Im-Ex > Order > Import, the window appears as shown below:

WooCommerce Order Import

WooCommerce Order Import

  1. Method 1: Select a file from your computer. Click Choose File to browse a required CSV/XML file from your computer.
  2. Method 2: Provide FTP Details. If your CSV file is on the server, then to import it,  you need to do FTP settings as given below:
  3. Select the checkbox to enable FTP import/export.
    • Enter FTP Server Host/IP.
    • Enter FTP User Name.
    • Enter FTP Password.
    • Enter FTP Port number.
    • Enter FTP Server Path.
    • Select the checkbox to use FTPS.
  4. You get the mapping file option(s) for auto-mapping only if you save the mapped fields with a user-defined file name while Mapping the fields. Select the required mapping file from the Select a mapping file drop-down list as shown below:
    Select a mapping file
    Select a mapping file
  5. Update order if exists: check this box if you want to update the existing orders with the information in the CSV/XML file
  6. Create User: By enabling this checkbox, if while importing the orders, the user corresponding to order is not found, a new user will be created.
  7. Enter the delimiter which separates the mapping values.
  8. If you have chosen to update order if exists, then tick Send mail on order status update to send mail to the customers whose order status have been updated.
  9. Click Proceed to Import Mapping. The mapping window appears as shown below:Orders import mapping pageOrders import mapping page
  10. You can map the fields(Woocommerce fields) with column headings ( CSV file header). Map a particular field of Map to column by using Column header  drop-down list as shown below:Orders mapping column headerOrders mapping column header
  11. Select a required option from the drop-down list. Here, Order ID is mapped to order_id.
    Note: Mapping is very helpful if you are importing CSV from some other e-Commerce platform like Magento.
  12. Evaluation fieldSample evaluation fieldsSample evaluation fields
  13. It is used to fix/update the required value for the particular field. The settings to modify the field are as given below:
    • Assign any required constant value to field (=)
      For Example: Suppose, you want to assign completed to Order Status. Under Evaluation field, write =completed in Order Status row.
    • Add any required value to field (+)
      For Example: Suppose, you want to add 5 to Shipping Total. Under Evaluation field, write +5 in Shipping Total row.
    • Reduce any required value from field (-)
      For Example: Suppose, you want to reduce 5 from Order Total. Under Evaluation field, write -5 in Order Total row.
    • Multiply by any required value to field (*)
      For Example: Suppose, you want to multiply to Shipping Tax Total by 1.05. Under Evaluation field, write *1.05 in Shipping Tax Total row.
    • Divide by any required value to field (/)
      For Example: Suppose, you want to divide Cart Discount by 2. Under Evaluation field, write /2 in a row.
    • To Convert the order date to WooCommerce format, provide your CSV date format in the evaluation field.
      For Example: In CSV,  If you have entered the date in correct PHP format as @ d/m/yy H:i:s ( @ 13/07/2016 4:24:25) , then under Evaluation field, you must maintain the same date format as @ d/m/yy H:i:s  in the order_date row. Then the plugin internally converts it in WooCommerce format as 2016-07-13 4:24:25.
    • Append any field by the required value
      For Example: Suppose, you want to append Billing Company by Pvt Ltd. Under Evaluation field, write &Pvt Ltd in billing_company row.
    • Prepend any field by the required value
      For Example: Suppose, you want to prepend Billing First Name by Mr/ Mrs. Under Evaluation field, write &Mr/Mrs[VAL] in Billing First Name row.
      Note: Hover the mouse on? (Help), you can see the information about Evaluation field. For more information on Evaluation field, See Evaluation field in Order Export-Import Plugin for WooCommerce article.
  14. After mapping all the required field, you can save these mapping and evaluation fields in a file (user-defined) by using Mapping file name field.
  15. Click Submit.
  16. According to CSV file, the order(s) gets added to your online store. The import window appears as shown below:Order import completed successfullyOrder import completed successfully
  17. While importing orders with the applied coupon, the plugin connects coupon if the same coupon exists in the online store.

Merge Orders

Suppose your existing order got modified. To reflect that modified order into your online store, you can update the current order by importing the modified order CSV file. This is called a merging of the order.

Steps to merge orders

  1. Go to the Import section in the Order tab.
  2. Select Merge order if exists checkbox for modifying orders as shown below:

    WooCommerce Order Import-Update orders

    WooCommerce Order Import-Update orders

  3. Click Proceed to Import Mapping, you will get to the next step to the import mapping window as shown below:

    Order import mapping

    Order import mapping

  4. Map the column headers of the CSV file with the order data fields.
  5. Click Start Import.
  6. According to CSV file, the order gets merged with the existing order. The window appears as shown below:
    Order merge completed successfully

    Order merge completed successfully

    Note: If Order ID does not exist, then the order is imported as a new order.

Export Orders

If you export order using the plugin, you will get a CSV or XML file which contains the data about all the orders of the WooCommerce online store.

WooCommerce Order Export

WooCommerce Order Export

You can export all the required orders by using the Export Orders option. The window appears as shown below:

  1. Order Statuses:  Select order statuses for which you want to export orders from the given list:Order statuses
  2. Product: To export orders of only specific products, select required products from this field.
  3. Coupons: Enter coupon codes separated with commas to export those orders to which the specified coupons are applied.
  4. Offset: Enter the order row number at which you wish to start the export.
  5. Limit: Enter the maximum number of orders that you wish to export.
  6. Start Date: Select the date from which you want to export the orders by clicking on the calendar icon.
  7. End Date: Select the date till which you want to export the orders by clicking on the calendar icon.
  8. Delimiter: With this field, you can change the comma separated file to ‘|’ or ‘.” separated file according to your requirement.
  9. Columns: Select the checkbox for required columns if you want to export specific columns. With the Column Name field, you can modify the column header in the CSV file. To do that, simply enter the required column name for the specific column.
  10. Exclude already exported: Check this to avoid duplication while exporting.
  11. Export line items into separate columns: In order to export line items in a separate column, tick this checkbox.
  12. Include hidden metadata: If you want to include custom metadata of the order in the export, especially from third-party plugins, then tick this checkbox. 
  13. Click Export Orders (CSV) or Export Orders (XML), the CSV/XML file gets auto-downloaded to your computer. The sample orders CSV file is as shown below:
    Sample exported orders CSV file

    Sample exported CSV file

    Note: You can download the Sample Exported CSV.

    Exporting User role and additional metadata from WooCommerce
    You can also export user role and additional metadata from WooCommerce. To do this, you need to add code Snippets in the child theme’s functions.php.
    -If you are using Plugin Version 1.1.1, please refer Export Customer Roles and Additional Order Meta Data from WooCommerce article for code snippet and a brief explanation about it.
    -If you are using Plugin Version 1.1.0 or below, you need to add two separate code snippet to export user role and additional Meta Data from WooCommerce.

    1. To export user role, please refer to Export Customer Roles Along with Order Details from WooCommerce
    2. To Export additional WooCommerce Meta Data, please refer to Export Additional Order Meta Data from WooCommerce.

Export order(s) from Order Page

Orders listing page

Orders listing page

You can directly download the export file with all the fields. To do that, navigate to Dashboard > WooCommerce > Orders. The Order page appears as shown below:

  • Click Download to CSV button to export single order to CSV file.
  • To export bulk orders, select them. From the Bulk Action drop-down list, select Download as CSV and click Apply. All the information about the selected order gets auto-downloaded to CSV file.

Check out our Order / Coupon / Subscription Export Import Plugin for WooCommerce.

  • Was this article helpful ?
  • YesNo