• Resolved marija126

    (@marija126)


    Hello,

    I have used Woocommerce on my old site where I gathered a number of orders. I made a new redesigned website where I made a new store. I would like to know is there a way to transfer all the old orders to my new site and to make the new orders have the following number from the last order from old site?

    For example, lets say my last order on old site is #4567 and I would like to set new orders from new site to start from #4568

    Is there a way to do this?

    Thanks

    https://www.ads-software.com/plugins/woocommerce/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    You’d need to edit the POSTS table and change the auto increment value on post ID, however, you should know that order IDs are not sequential in WooCommerce as they are post IDs. Numbers will skip.

    https://en-gb.www.ads-software.com/plugins/woocommerce-sequential-order-numbers/ will give you sequential numbering.

    Thread Starter marija126

    (@marija126)

    OK, thanks for your answer.

    But what about transfering orders? I tried exporting orders via WordPress Export under Tools, but I don’t have all the order details when I do that. I tried some other plugins but it messed up my WooCommerce functionality so I had to delete it and it install it again.

    Can you give me some advice on that topic? What would be the best way to export orders from old site and import them to new site but keep details of the order.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    If they are WC orders, you’d be best migrating the entire database to be honest, to avoid losing anything. There are order import/export extensions out there also.

    Thread Starter marija126

    (@marija126)

    Thanks a lot for your answers! Is there some useful text on transferring the database? I never done that so I am a bit worried something will go wrong

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I just want to share my experience as it might help someone here.

    I created this new wordpress/woocemmerce site for a client and setup everything fine.
    They moved from a drupal eshop to a new wordpress/woocommerce setup.
    They already had some thousands transactions in their drupal eshop and their online credit card processing system (Piraeus bank)

    So far so good. Here the problems start.
    Their online credit card processing provider (Piraeus bank) handles all transactions sequentially and can not change these. So naturally, my woocommerce orders CAN NOT START from 0001 for example.

    So I thought OK, I have to alter the order number

    I Did that with Booster for WooCommerce which by the way is SOOO worth it. But the NEW ORDER NUMBER I set in the back end of woocommerce does not reflect on the order_id set in the database. That number is an auto increment number that is used for all post types in wordpress!

    My payment gateway (Piraeus bank Gateway) uses the order_id (woocommerce orders post id number in other words) to send and receive order success/failure etc so I needed to change that incremental number of the posts

    My solution after trying and researching was to go into phpMyAdmin and go to the table POSTS. There in the tab OPERATIONS I set AUTO_INCREMENT = to something larger than the last transaction number before migrating to the wordpress/woocommerce setup.

    Now their online credit card processing provider receives a number greater than the last Drupal installation and everything works fine. I know its not ideal. The best would be to have a plugin match ORDER_ID with ORDER NUMBER.

    There you go….

    Just a quick correction.

    I mentioned above that “Their online credit card processing provider (Piraeus bank) handles all transactions sequentially “

    That is not true as it now receives the post_id from the order.
    Sorry for that.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Woocommerce order numbers’ is closed to new replies.