Automattic\WooCommerce\Admin\API\Reports
Controller::get_order_status_labels()
Get order statuses (and labels) without prefixes.
Метод класса: Controller{}
Хуков нет.
Возвращает
Массив
.
Использование
$result = Controller::get_order_status_labels();
Код Controller::get_order_status_labels() Controller::get order status labels WC 8.7.0
public static function get_order_status_labels() { $order_statuses = array(); foreach ( wc_get_order_statuses() as $key => $label ) { $new_key = str_replace( 'wc-', '', $key ); $order_statuses[ $new_key ] = $label; } return $order_statuses; }