Oxygen 4.0 is now available - see what's newlimited time special pricing available
Posted on July 11, 2022

How to Export WooCommerce Orders and Products 2022

hello world!

Want to know how to export WooCommerce orders and products? In this article, we’ll start by teaching you the basics. Then we’ll dive deep into the most challenging problems you’ll encounter when performing these tasks.

By the end, you’ll be a true export master. You’ll also have a handy reference in case you run into problems exporting WooCommerce orders and products in the future.

Here is what is contained in this article:

How to Export WooCommerce Orders

Finding the Right Order Export Plugin

Step-by-Step Instructions to Export WooCommerce Orders — The Basics

Export WooCommerce Orders — Advanced Topics

Export WooCommerce Orders — Frequently Asked Questions

How to Export WooCommerce Products

Finding the Right Product Export Plugin

Step-by-Step Instructions to Export WooCommerce Products — The Basics

Export WooCommerce Products — Advanced Topics

Export WooCommerce Products — Frequently Asked Questions

Related Information

How to Export WooCommerce Orders

Export WooCommerce Orders

Despite its extensive functionality, WooCommerce does not have the ability to export sales orders on its own. For this, you require a third-party plugin.

Finding the Right Order Export Plugin

If you search the internet, you will find several plugins capable of exporting WooCommerce orders. Unfortunately, most of them suffer from the same two limitations:

  1. They aren't designed to handle complex order exports, which are often required when trying to integrate with external systems. Instead, you must create custom code for these situations, which is always the least desirable solution.
  2. They're generally limited to importing and exporting orders, or at best handling only WooCommerce data. This means that if you put in the time to master them and then encounter import or export needs for other WordPress data, you'll have to switch to another tool.

The one plugin that doesn't have these limitations is WP All Export. It can handle every aspect of exporting WooCommerce orders no matter how complex.

WP All Export WooCommerce Orders

 

Even better, the same plugin can handle all your other export needs regardless of whether they involve WooCommerce, another plugin, or any part of WordPress. The same is true on the import side with WP All Import.

Step-by-Step Instructions to Export WooCommerce Orders — The Basics

Export Orders Step 1: Download and Install the Plugins

Download and install the base WP All Export plugin and its WooCommerce Export Order add-on. If you don't have access to these plugins, you can use this free online sandbox. Just choose the WooCommerce Store option and click Create Sandbox.

Export Orders Step 2: Start a New WooCommerce Order Export

Navigate to All Export > New Export in the WordPress main menu. Select WooCommerce Orders as the export type. Then click the blue Customize Export File button at the bottom:

Create WooCommerce Order Export

Export Orders Step 3: Select Your Order Export Fields

When exporting WooCommerce orders, most users do not require all the order data fields.

WP All Export provides a simple Drag & Drop interface to let you select a subset of these fields.

The available order tables and fields are displayed in the Available Data section on the right. To export a field, drag it into the column selection area:

Customize WooCommerce Order Export

To remove a field, simply drag and drop it outside the column selection area.

WP All Export lets you select fields from all of these categories:

  • WooCommerce Order Data
  • WooCommerce Customer Data
  • WooCommerce Order Items
  • Order Taxes & Shipping
  • Order Fees & Discounts
  • Order Notes
  • Order Refunds
  • WooCommerce Order Custom Fields
  • All other WooCommerce order fields

Export Orders Step 4: Download the Order Export File

Once you’ve completed setting up your order export, click Continue, then verify the export settings. To run the export, click Confirm & Run Export. You can then click either the CSV or Bundle button in the Click to Download section:

Confirm and Run Order Export

The bundle file contains both a CSV file and an import template that helps WP All Import automatically process the CSV file. This makes migrating orders from one site to another quick and easy.

And that’s it! A basic WooCommerce order export couldn’t be any simpler!

Export WooCommerce Orders — Advanced Topics

Some of the instructions in this section require the Pro version of the plugins, which you can read about at Export WooCommerce Orders to XML & CSV. In case you do not have this version, we have provided visuals that allow you to read the following examples without performing them.

Export Orders to a Different File Type

The preceding example exported orders to a CSV file, but you can quickly change this to Excel simply by changing the export type in the Drag & Drop interface:

Export WooCommerce Orders to Excel

Prefer XML? Not a problem:

Export WooCommerce Orders XML

Note, you can export WooCommerce orders to a Simple XML Feed or a Custom XML Feed. If you choose a custom feed, you can make this feed as complex/sophisticated as you require.

Apply Powerful Filters to Your WooCommerce Order Export

Applying filters to your WooCommerce order export is easy. You can do this in the Add Filtering Options section of the New Export screen:

Export WooCommerce Orders Simple Filter

This filter means, “Export WooCommerce orders with an order date equal to or newer than January 01, 2018.”

You can also combine filters:

Export WooCommerce Orders Combination Filter

And create nested filters:

Nested Filter

Create Custom Order Export Columns Using PHP

In the Drag & Drop interface, if you click the Add Field button…

Export WooCommerce Orders Add Field

…you can create custom export columns. In the following example, we’ve used drag & drop to combine the Billing First Name and Billing Last Name fields into a custom column called “Name”:

Custom Field

That’s a simple custom field. To create a more complex field, you can use the Function Editor (shown above) to define your field using PHP:

function output_shipping($weight){

   if($weight <= 10) {
     return "USPS";
   } else if ($weight > 10 && $weight < 30) {
     return "DHL";
   } else if ($weight >= 30) {
     return "Knight-Swift Freight";
   }

}

Then just refer to the function in the Custom export field box, like this:

Function Editor

It is a testament to WP All Export that we have barely even scratched the surface of its WooCommerce order export capabilities. Other advanced features include the ability to:

  • Use WP_Query to create queries that can’t be created any other way, at least not efficiently
  • Use WPML to export your orders in different languages
  • Automatically schedule your WooComerce order exports
  • Split large order exports into different batches and files
  • Integrate with Zapier to send WooCommerce order exports to 1,000s of external apps

Export WooCommerce Orders — Frequently Asked Questions

Can I export custom WooCommerce order data added by a plugin? What about WooCommerce extensions?

Yes. WP All Export automatically detects all custom fields created by any theme, plugin, or WooCommerce extension.

Is there any XML order export requirement that is too complicated for these plugins to handle?

No. WP All Export lets you control every aspect and detail of XML output.

How Do I Import Orders into WooCommerce?

  1. Go to All Import -> New Import in the WordPress main menu.
  2. Specify how you want to load your data (i.e., upload a file, use a URL, etc.).
  3. Select your import file and choose your import target (i.e., WooCommmerce Orders).
  4. Use the Drag & Drop interface to map incoming fields to your WooCommerce target fields.
  5. Run the import.

How Do I Migrate WooCommerce Orders to Another Website?

Export the orders that you wish to migrate. When you do this, download 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 process the bundle file based on its settings.

How to Export WooCommerce Products

Export WooCommerce Products

Unlike with its sales orders, WooCommerce does have the built-in ability to export product data. However, these capabilities are extremely limited and only suitable for quick, ad hoc exports. If you want anything more than this, you will again have to turn to 3rd-party plugins.

Finding the Right Product Export Plugin

The same arguments in favor of WP All Export apply here, too. In fact, with its unique ability to generate a fully compliant product feed for the Google Merchant Center, WP All Export offers even more advantages for exporting WooCommerce products than it does for exporting orders.

WP All Export WooCommerce Products

Step-by-Step Instructions to Export WooCommerce Products — The Basics

Export Products Step 1: Download and Install the Plugins

Download and install the base WP All Export plugin and its WooCommerce Export Product add-on.

Export Products Step 2: Start a New WooCommerce Product Export

Go to All Export > New Export and select WooCommerce Products as the export type. Then click the Customize Export File button:

Create WooCommerce Product Export

Export Products Step 3: Choose Your Product Export Fields

When exporting WooCommerce products, most users only require a subset of the available fields. WP All Export meets this need by providing a simple Drag & Drop interface.

The available product tables and fields are displayed in the Available Data section on the right. To export a field, drag it into the column selection area:

Customize WooCommerce Product Export

To remove a field, simply drag and drop it outside the column selection area.

WP All Export lets you select fields from all of these categories:

  • WooCommerce Standard Data
  • WooCommerce Product Data
  • Media
  • Taxonomies
  • WooCommerce Custom Fields
  • All other WooCommerce product fields

Export Products Step 4: Download the Product Export File

Once you’ve completed setting up your product export, click Continue, then verify the export settings. To run the export, click Confirm & Run Export. You can then click either the CSV or Bundle button in the Click to Download section:

Confirm and Run Product Export

The bundle file contains both a CSV file and an import template that helps WP All Import automatically process the CSV file. This is extremely helpful if you’re trying to migrate products from one site to another.

And that’s it. That’s how you perform a basic WooCommerce product export!

Export WooCommerce Products — Advanced Topics

Some of the instructions in this section require the Pro version of the plugins, which you can read about at Export WooCommerce Products. In case you do not have this version, we have provided visuals that allow you to read the following examples without performing them.

Export Products to a Different File Type

The preceding example exported products to a CSV file, but you can quickly change this to Excel simply by changing the export type in the Drag & Drop interface:

Export WooCommerce Products to Excel

Prefer XML?

Export WooCommerce Products XML

Note, you can export WooCommerce products to a Simple XML Feed or a Custom XML Feed. If you choose a custom feed, you can make this feed as complex/sophisticated as you require.

Apply Powerful Filters to Your WooCommerce Product Export

Applying filters to your WooCommerce product exports is easy. You can do this in the Add Filtering Options section of the New Export screen:

Export WooCommerce Products Simple Filter

In this case, we are saying, “Export WooCommerce products with a product category of ‘classic’.”

You can also combine filters:

Export WooCommerce Products Combination Filter

You can even write your WooCommerce product export filters using PHP:

function exclude_drafts_from_gmc_export($articles, $options, $export_id) {

    // Only filter GMC exports.

    if ($options["xml_template_type"] == "XmlGoogleMerchants") {

        // Process every exported product.

        foreach ($articles as $key => $article) {

            // If IDs aren't set to be exported, do nothing.

            if ( ! empty($article['id']) ) {

                $post_id = $article['id'];

                $parent_id = wp_get_post_parent_id($post_id);

                // Check the parent's Status.

                if ( get_post_status($parent_id) == "draft" ) {

                    // Don't export variation if parent is 'draft'.

                    unset($articles[$key]);

                }

            }

        }

    }

 

    return $articles;

}

add_filter('wp_all_export_csv_rows', 'exclude_drafts_from_gmc_export', 10, 3);

Export Your Products to the Google Merchant Center

To export WooCommerce Products to the Google Merchant Center, just change your product export type to Google Merchant Center Product Feed, as shown below:

Export WooCommerce Products to Google Merchant Center

WP Export will respond by presenting the Google Merchant Center options divided into various sections:

Google Merchant Center Product Export Options

You can modify the settings for each of these sections. For example, here are the typical settings for the Basic Product Information panel.

Basic Product Information

And here’s a typical setup for the Availability & Price panel:

Availability and Price

For complete instructions on exporting WooCommerce products to the Google Merchant Center, please see our article, How to Export WooCommerce Products to the Google Merchant Center.

The important point here is that, in addition to guiding you through this special export process, WP All Export will create an export file that is automatically set up for submission to the Google Merchant Center. And what happens if submission requirements change? No problem. WP All Export will change right along with them.

In addition to all this functionality for exporting WooCommerce products, this plugin also allows you to:

  • Use WP_Query to create queries that can’t be created any other way, at least not efficiently
  • Use WPML to export your products in different languages
  • Bulk edit your Woocommerce product data
  • Automatically schedule your WooComerce product exports
  • Split large product exports into different batches and files
  • Integrate with Zapier to send WooCommerce product exports to 1,000s of external apps

Export WooCommerce Products — Frequently Asked Questions

Can I export custom WooCommerce product data added by a plugin? What about WooCommerce extensions?

Yes. WP All Export automatically detects all custom fields created by any theme, plugin, or WooCommerce extension.

Is there any XML product export requirement that is too complicated for this plugin to handle?

No. WP All Export lets you control every aspect and detail of the XML output.

How Do I Import Products into WooCommerce?

  1. Go to All Import -> New Import in the WordPress main menu.
  2. Specify how you want to load your product data (i.e., upload file, use a URL, etc.).
  3. Select your import file and choose your import target (i.e., WooCommmerce Products).
  4. Use the Drag & Drop interface to map incoming fields to your WooCommerce target fields.
  5. Run the import.

How Do I Migrate WooCommerce Products to Another Website?

Export the products that you wish to migrate. When you do this, download 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 process the bundle file based on its settings.

Want more information on how to export WooCommerce orders and products? See these key articles:

How to Export WooCommerce Orders to CSV, Excel, or XML

How to Export WooCommerce Products

How to Export WooCommerce Products to Google Merchant Center

How To Import and Export Advanced Custom Fields (ACF)

How To Export and Import WordPress Categories and Tags

Leave a Reply

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

Get Oxygen Today

Lifetime, unlimited site license

Copyright © 2022 Soflyy
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram