wc_update_order()
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() wc update order code WC 9.5.1
function wc_update_order( $args ) { if ( empty( $args['order_id'] ) ) { return new WP_Error( __( 'Invalid order ID.', 'woocommerce' ) ); } return wc_create_order( $args ); }