WordPress at Your Fingertips
function is not described

WC_API_Orders::get_order_statuses() public WC 2.1

Get a list of valid order statuses

Note this requires no specific permissions other than being an authenticated API user. Order statuses (particularly custom statuses) could be considered private information which is why it's not in the API index.

{} It's a method of the class: WC_API_Orders{}

Return

Array.

Usage

$WC_API_Orders = new WC_API_Orders();
$WC_API_Orders->get_order_statuses();

Changelog

Since 2.1 Introduced.

Code of WC_API_Orders::get_order_statuses() WC 5.5.2

<?php
public function get_order_statuses() {

	$order_statuses = array();

	foreach ( wc_get_order_statuses() as $slug => $name ) {
		$order_statuses[ str_replace( 'wc-', '', $slug ) ] = $name;
	}

	return array( 'order_statuses' => apply_filters( 'woocommerce_api_order_statuses_response', $order_statuses, $this ) );
}