Export orders

Updated

Download your orders as a spreadsheet (CSV) file you can open in Excel, Numbers or Google Sheets, or hand to your accountant.

Download your orders

  1. Go to WooCommerce → Export orders
  2. Under Rows, choose One row per order or One row per item (see One row per item)
  3. To export only some orders, fill in Ordered from and to. Leave both empty for every order
  4. To export only some statuses, tick them under Statuses. Leave all unticked for every status
  5. To export only orders with some products, pick categories or products under Only orders with
  6. Select Download orders

The file holds customers’ names, addresses and emails. Keep it somewhere safe and delete it when you’re done.

Export a few orders from the Orders list

  1. Go to WooCommerce → Orders
  2. Tick the orders you want
  3. In the bar that appears above the list, open More actions and choose Export: one row per order or Export: one row per item
  4. Select Apply

The file holds only the ticked orders.

Only orders with some products

Under Only orders with, pick one or more categories, products, or both. The file then holds only orders with at least one of those products.

  • A category takes in the categories under it
  • The product search also finds drafts and private products, so you can export orders for something you no longer sell. A product that has been deleted can’t be picked
  • With One row per order, a matching order is exported whole, with its other items too
  • With One row per item, the file holds only the rows for those products

What’s in the file

With One row per order, there’s a row for each order, in the order WooCommerce created them (by order ID):

  • The order number, status, dates (in your site’s timezone) and currency
  • The customer’s billing and shipping details, and their note
  • How they paid
  • The totals: subtotal, discounts, shipping, tax, the order total and the amount refunded
  • Every product in the order, with its quantity, amounts and any add-on answers, plus the product’s SKU as it is today (empty if the product has since been deleted)
  • Shipping, fees, tax lines and coupons
  • Refunds and order notes
  • A column for each of your checkout fields
  • If you use pickup times, the start and end of the chosen pickup slot (pickup_time_start, pickup_time_end)

Orders in the bin aren’t exported. Neither are checkout drafts, the unfinished carts WooCommerce saves while someone is still checking out.

How items are written

An order can hold several products, so the line_items column packs them into one cell:

name:Blue shirt|sku:BS-1|quantity:2|total:40;name:Cap|quantity:1|total:15
  • Items are separated by ;
  • An item’s details are separated by |
  • Each detail is a name, a :, then its value

The shipping_items, fee_items, tax_items, coupon_items, refunds and order_notes columns work the same way. When a value itself contains |, ; or \, the file writes a \ before it.

One row per item

Choose One row per item to sort, filter or add up by product in a spreadsheet, such as a list of tickets sold for one day. Each product in an order gets its own row:

  • The order’s number, status, dates, customer details and payment method, repeated on each of its rows
  • item_name, item_product_id, item_variation_id and item_sku
  • item_quantity, and the item’s amounts: item_subtotal (before discounts), item_total (after discounts) and their tax
  • item_refunded_quantity and item_refunded_total: how much of the item has been refunded
  • Your checkout field answers and the pickup time, as in the other file
  • A column for each option the items carry, such as a booking date or an add-on answer. They’re named item_meta: and the option’s name, such as item_meta:Date. A variation’s attribute is written as WooCommerce stores it, by its slug, such as item_meta:pa_size holding large

This file has no order totals, shipping, fees, coupons, refund dates or notes: use One row per order for those. An order with no products, such as one that holds only a fee, has no rows.

Good to know

  • Ordered from and to go by the day the order was placed, in your site’s timezone
  • Amounts are written as WooCommerce holds them, with a . as the decimal point and no currency symbol, so 40 and 40.00 can both appear
  • A cell that starts with =, +, -, @, a tab or a line break and isn’t a number gets a ' in front, so a spreadsheet shows it as text instead of running it as a formula
  • There’s no order import yet. To move orders between sites, ask your Dirigible developer

Built by Dirigible Studio. Get in touch