Automattic\WooCommerce\Internal\Admin\Orders
ListTable::set_status_args
Implements filtering of orders by status.
Method of the class: ListTable{}
Hooks from the method
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->set_status_args();
ListTable::set_status_args() ListTable::set status args code WC 10.3.3
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;
}