Back to blog
4 min read Export Guides

Export WooCommerce Orders to CSV for a Shipping Tool

Shipping tools such as ShipStation, Sendcloud or a courier’s own portal can import orders from a CSV file. WooCommerce has no export for that, and copying addresses from the order screen one by one is where typos in postcodes come from. With Import Export by RockStarLab you export the orders waiting to ship, with the shipping address, phone and a readable list of items, into a CSV with the column names you choose. The example uses four orders in a coffee roastery’s shop.

PRO: WooCommerce order export and the custom function for the item list need Import Export PRO. Free: posts, pages, comments and media export.

Short Answer

  1. In Export, choose WooCommerce Orders and add the filter Status equals processing.
  2. Add Order Number, the Shipping Address fields, Phone, Email, Shipping Method and Order Items, and rename each column to what your shipping tool expects.
  3. Turn Order Items into “2 x Product (SKU)” with a PRO function, and export as CSV.

Select the orders to ship

Paid orders that haven’t shipped yet have the status Processing in WooCommerce. Add the filter Status Equals processing:

WooCommerce Orders export filter: Status equals processing; total items available 4
Only orders waiting to be shipped: status processing.

Four of the shop’s ten orders match. To also include orders on hold, use the condition In with processing, on-hold.

Choose and rename the columns

From the Shipping Address group add First Name, Last Name, Company, Address 1, Address 2, City, Postcode and Country; from the billing group add Phone and Email, which WooCommerce stores with the billing address. Add Shipping Method and Order Items.

Click the pencil icon on each column and type the header your shipping tool uses. A column you don’t rename keeps the field name in the file, for example shipping_first_name, so rename every column the tool should recognise:

Export columns: Order, First Name, Last Name, Company, Address 1, Address 2, City, Postcode, Country, Phone, Email, Shipping Method and Items with one transformation
Shipping address, contact details and the item list, each column renamed for the shipping tool.

Make the item list readable

Order Items exports every product of the order as JSON, with IDs, totals and taxes: fine for a re-import, unreadable on a packing slip. A short PRO function turns it into one line. In Functions, create one with this code:

$items = json_decode( $value, true );
if ( ! is_array( $items ) ) {
	return $value;
}
$lines = [];
foreach ( $items as $item ) {
	$lines[] = $item['quantity'] . ' x ' . $item['name'] . ' (' . $item['sku'] . ')';
}
return implode( '; ', $lines );

Then click the gear icon on the Items column, assign the function and check it with Test Pipeline:

Field Transformations for Order Items: the function Order items as packing list turns the JSON test value into 2 x Logo Mug (woo-logo-mug); 1 x Beanie with Logo (Woo-beanie-logo)
Test Pipeline shows the item list before you export.

See transformation functions for more on functions.

The file

Choose CSV on the format step and export. Our file:

Order,"First Name","Last Name",Company,"Address 1","Address 2",City,Postcode,Country,Phone,Email,Service,Items
2038,Dmitri,Volkov,,"Keizersgracht 210",,Amsterdam,"1016 DZ",NL,"+31 20 555 0404",dmitri.v@example.test,"DPD Standard","1 x Hoodie with Logo (woo-hoodie-with-logo)"
2037,Carla,Mendes,,"Rua Augusta 45","2º Esq",Lisboa,1100-048,PT,"+351 21 555 0303",carla.m@example.test,"DPD Standard","2 x Logo Mug (woo-logo-mug); 1 x Beanie with Logo (Woo-beanie-logo)"
2014,Ben,Turner,"Turner & Co","8 Mill Lane","Unit 3",Bristol,"BS1 4XX",GB,"+44 117 496 0202",ben.t@example.test,"DPD Standard","2 x Hoodie with Logo (woo-hoodie-with-logo); 1 x Cap (woo-cap)"
2005,Anna,Kovacs,,"Váci utca 12",,Budapest,1052,HU,"+36 1 555 0101",anna.k@example.test,"DPD Standard","2 x Beanie with Logo (Woo-beanie-logo); 1 x Beanie (woo-beanie)"

Postcodes with spaces (1016 DZ, BS1 4XX), the company and the second address line come through as they are in WooCommerce, and each order is one row with its items in the last column. Countries are two-letter codes (NL, GB), as WooCommerce stores them.

Before you import anything back

This export only reads orders. If you later import changes back into WooCommerce, such as new order statuses, back up the site first; see importing WooCommerce orders from CSV.

With an AI agent

An AI agent connected through the WordPress MCP Adapter (see connecting Claude Code to WordPress) can tell you how many orders are waiting before you export:

How many WooCommerce orders are processing?

In our run, the agent called rsl-ie-pro/export-count for WooCommerce Orders with the filter order_status equals processing and answered 4; without the filter the count was 10.

FAQ

Can I export one row per product instead of one row per order?

Not with the order export: each order is one row. The function above puts all items of the order into one column.

Why are Phone and Email in the billing group?

WooCommerce asks for the phone and email with the billing address, so that’s where they are stored, even for shipping.

Do I need PRO for this?

Yes, WooCommerce orders and custom functions are PRO features.

Can I export only today’s orders?

Yes, add a filter on Order Date, for example equals or greater than today’s date, next to the status filter.

Get the free plugin on WordPress.org.

Dmitriy
About author

Dmitriy

WordPress Developer with 15+ years of commercial experience. Elite Author on ThemeForest and creator of custom WordPress plugins. Passionate about clean code, performance optimization, and building useful tools for the WordPress community.

JOIN THE CONVERSATION

Comments 0

Have a question or a tip to share? Leave it below.

Leave a comment

Your email address will not be published. Required fields are marked *

We store your name, email and comment to show and moderate it; your email is never published. Spam protection is provided by Cloudflare Turnstile and profile pictures by Gravatar. See our Privacy Policy.


Try the plugin with no risks!

New users get 1 month with access to all premium features. Experience the most powerful WordPress data engine today.

Download Now
Get PRO for FREE