Change orders status by order number in Woocommerce

You can loop through ids and use wp_update_post() to update stautus. Here’s a list of wc order statuses.

$order_ids = [ 638, 637, 636, 635, 634 ];

foreach( $order_ids as $id ) {
       'ID'          => $id,
       'post_status' => 'wc-completed'

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top