Before WooCommerce 2.2, shop order post statuses were associated with orders using the shop_order_status taxonomy. Starting in version 2.2, shop order post statuses started using post status.
Any shop order posts with custom order statuses created using the shop_order_status taxonomy prior to 2.2 get set to a post status of ‘publish’ after the upgrade rather than the shop_order_status term or a default WooCommerce order status like processing, complete etc.
A remedy to this issue is to modify your theme or use a plugin after the upgrade to create a new post status as a replacement and then add it to the list of order statuses. In the example below I’m using an order status called In-Production.
When dealing with multiple custom shop_order_status terms you’ll need to create a new post status for each shop_order_status you wish to keep using. Then use the wp_term_relationships, wp_term_taxonomy and wp_terms tables to add an additional check in the function update_published_orders above to match each shop order with a shop_order_status term and decide which new post status to give the shop order post after the upgrade.