When an order is created, WooCommerce automatically sets the order_id and order_number. If the CSV file has order_number and order_id, that value will be imported. On importing the CSV, if the order_id conflicts with an existing id, the order will be imported as a new item. This will change the value of order_id. Also, the order_number will change with respect to order_id. The Order, Coupon, Subscription Export Import for WooCommerce helps to export and import this order number with ease. To preserve the order numbers while importing WooCommerce orders:
- Install and activate any third-party plugin which will help import the order number as is.
- Select the post type as Order.
- Select an import method.
- Map the import columns.
- Use the advanced options and import.
To resolve this issue:
Before importing the order, download and install any 3rd party plugin which will help import the order number as is. Here, we recommend you install and activate the Sequential order number for WooCommerce plugin by WebToffee.
Let us consider a sample CSV with order number and order id as 69.
Importing order number as is
- From the WordPress admin panel, navigate to the menu WebToffee Import Export (Pro).
- Click on Import and specify the post type as Order.
- Select your import method and Import from location.
- Map the import columns.
- Select the required advanced import options and click on Import to finish.
For a step-wise procedure of import, refer to How to import WooCommerce Orders.
Here, due to a conflict with an existing ID, the new order will get imported with order_id (70) and order_number (69) will be imported as is. As the third-party plugin is activated, the plugin will import the order number same as in the input file.
- Was this article helpful?
- Yes, thanks!Not really
Comments (2)
Stephen
August 30, 2023
I have Sequential Order Number for Woocommerce. I recently used it to preserve original order numbers when I imported all of my past orders into a staging site. It worked perfectly. The import plugin I used was CSV Import suite. This worked perfectly! All of my previous orders imported with the original Order numbers, then I did a test order (new order) and it created the new formatted order number that I chose in Sequential Number plugin. this was exactly what I was looking for!
Since then, I had to delete my staging site and create a new one. I am now trying to do the exact same operation, and Sequential Number plugin is NOT preserving the original order numbers for all past orders. It is applying the new format to all past orders. Why is it not working this time? I have done nothing different!
Please help
Vineetha
September 5, 2023
Hi Stephen,
Thanks for reaching out! The Sequential Order Number for WooCommerce plugin uses the meta key _order_number to store the sequential order number in the post-meta table. Kindly make sure you have exported that meta key too in the CSV file while creating the staging site.