wc_update_order()WC 1.0

Update an order. Uses wc_create_order.

No Hooks.

Return

WC_Order|WP_Error.

Usage

wc_update_order( $args );
$args(array) (required)
Order arguments.

wc_update_order() code WC 8.7.0

function wc_update_order( $args ) {
	if ( empty( $args['order_id'] ) ) {
		return new WP_Error( __( 'Invalid order ID.', 'woocommerce' ) );
	}
	return wc_create_order( $args );
}