WC_REST_Orders_V2_Controller::get_order_statuses()protectedWC 1.0

Get order statuses without prefixes.

Метод класса: WC_REST_Orders_V2_Controller{}

Хуков нет.

Возвращает

Массив.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_order_statuses();

Код WC_REST_Orders_V2_Controller::get_order_statuses() WC 8.7.0

protected function get_order_statuses() {
	$order_statuses = array( 'auto-draft' );

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

	return $order_statuses;
}