wc_update_order

Update an order.

Description

(string) wc_update_order( (array) $args ); 

Uses wc_create_order.

Returns (string)

| WC_Order

Parameters (1)

0. $args (array)
The args.

Usage

  1. if ( !function_exists( 'wc_update_order' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-core-functions.php'; 
  3.  
  4. // The args. 
  5. $args = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_update_order($args); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-core-functions.php  
  1. function wc_update_order( $args ) { 
  2. if ( ! $args['order_id'] ) { 
  3. return new WP_Error( __( 'Invalid order ID.', woocommerce ) ); 
  4. return wc_create_order( $args );