You must use custom_post_status, instead wp_insert_term.
Here is a code
No link for the code – please share.
I edited woocommerce-custom-status.php and changed wp_insert_term to custom_post_status – no luck
thanks
I just updated to 2.2 and am wondering where all of my orders that were in a custom status went?? How can I change them back to a default status?
I think that I figured it out. It seems that all of my posts had a status of ‘publish’ – once I changed it to ‘wc-completed’ all of them showed up in my admins screen again.
Here is my sql for reference:
select * from wp_posts
where post_type = ‘shop_order’ and post_status = ‘publish’
then I did an update
update wp_posts
set post_status = ‘wc-completed’
where post_type = ‘shop_order’ and post_status = ‘publish’