WC_REST_Orders_V2_Controller::get_order_statusesprotectedWC 1.0

Get order statuses without prefixes.

Method of the class: WC_REST_Orders_V2_Controller{}

No Hooks.

Returns

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_order_statuses();

WC_REST_Orders_V2_Controller::get_order_statuses() code WC 10.3.6

protected function get_order_statuses() {
	$order_statuses = array( OrderStatus::AUTO_DRAFT );

	foreach ( array_keys( wc_get_order_statuses() ) as $status ) {
		$order_statuses[] = str_replace( 'wc-', '', $status );
	}

	return $order_statuses;
}