Automattic\WooCommerce\Internal\Admin\Orders

ListTable::get_visible_statuses()privateWC 1.0

Returns a list of slug and labels for order statuses that should be visible in the status list.

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

Хуков нет.

Возвращает

Массив. slug => label array of order statuses.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_visible_statuses(): array;

Код ListTable::get_visible_statuses() WC 8.7.0

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 ) ) )
	);
}