Joshua Cassidy
Joshua Cassidy

Reputation: 33

Syncing up Woocommerce orders between a live site and staging site

I've been working on some developmental tweaks and theme updates to a client's website on a staging version. The site has a live ecommerce component, so over the few months that I've worked on it, there have been a whole bunch of orders which are on the live site, but not the staging site.

Since Woocommerce (for some strange reason) keeps orders in the same table as its posts, products, pages etc., many of the order ids have already been "used up" in the staging site, so when I try to import them (using a tool like https://wordpress.org/plugins/order-import-export-for-woocommerce/ ) they desync and the order numbers are wrong. There are a few options here; I could try to divorce the visible order number from the post id #, but this is a bit wonky. I've tried some solutions, but these tend not to work with the import plugins I've used. Alternatively, I could always dig into the mysql tables, but this isn't something I want to do everytime I push from staging to live.

Is anyone willing to share a solution, plugin recco or best practice for dealing with this? Thanks!

Upvotes: 2

Views: 5161

Answers (1)

mujuonly
mujuonly

Reputation: 11861

You cannot keep the orderID for new import , as WP treating everything as post. You can add it as extra meta with order. It will update if the order is existing in the Database. Also you can rise a support ticket here for help

You can also get a plugin that can manage order extra meta from here

Upvotes: 0

Related Questions