Automattic\WooCommerce\Internal\Admin\Orders
ListTable::get_visible_statuses
Returns a list of slug and labels for order statuses that should be visible in the status list.
Method of the class: ListTable{}
No Hooks.
Returns
Array. slug => label array of order statuses.
Usage
// private - for code of main (parent) class only $result = $this->get_visible_statuses(): array;
ListTable::get_visible_statuses() ListTable::get visible statuses code WC 10.6.2
private function get_visible_statuses(): array {
return array_intersect_key(
array_merge(
wc_get_order_statuses(),
array(
'trash' => ( get_post_status_object( 'trash' ) )->label,
'draft' => ( get_post_status_object( 'draft' ) )->label,
'auto-draft' => ( get_post_status_object( 'auto-draft' ) )->label,
)
),
array_flip( get_post_stati( array( 'show_in_admin_status_list' => true ) ) )
);
}