wc_get_order_statuses

Get all order statuses.

Description

(array) wc_get_order_statuses(); 

Returns (array)


Usage

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

Defined (1)

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

/includes/wc-order-functions.php  
  1. function wc_get_order_statuses() { 
  2. $order_statuses = array( 
  3. 'wc-pending' => _x( 'Pending payment', 'Order status', woocommerce ),  
  4. 'wc-processing' => _x( 'Processing', 'Order status', woocommerce ),  
  5. 'wc-on-hold' => _x( 'On hold', 'Order status', woocommerce ),  
  6. 'wc-completed' => _x( 'Completed', 'Order status', woocommerce ),  
  7. 'wc-cancelled' => _x( 'Cancelled', 'Order status', woocommerce ),  
  8. 'wc-refunded' => _x( 'Refunded', 'Order status', woocommerce ),  
  9. 'wc-failed' => _x( 'Failed', 'Order status', woocommerce ),  
  10. ); 
  11. return apply_filters( 'wc_order_statuses', $order_statuses );