Automattic\WooCommerce\Admin\API\Reports
Controller::get_order_status_labels()
Get order statuses (and labels) without prefixes.
Method of the class: Controller{}
No Hooks.
Return
Array
.
Usage
$result = Controller::get_order_status_labels();
Controller::get_order_status_labels() Controller::get order status labels code 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; }