Automattic\WooCommerce\Internal\Admin\Orders
ListTable::set_status_args()
Implements filtering of orders by status.
Метод класса: ListTable{}
Хуки из метода
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->set_status_args();
Код ListTable::set_status_args() ListTable::set status args WC 8.3.1
private function set_status_args() { $status = array_filter( array_map( 'trim', (array) $this->request['status'] ) ); if ( empty( $status ) || in_array( 'all', $status, true ) ) { /** * Allows 3rd parties to set the default list of statuses for a given order type. * * @param string[] $statuses Statuses. * * @since 7.3.0 */ $status = apply_filters( 'woocommerce_' . $this->order_type . '_list_table_default_statuses', array_intersect( array_keys( wc_get_order_statuses() ), get_post_stati( array( 'show_in_admin_all_list' => true ), 'names' ) ) ); } else { $this->has_filter = true; } $this->order_query_args['status'] = $status; }