Automattic\WooCommerce\Internal\Admin\Orders

ListTable::set_status_args()privateWC 1.0

Implements filtering of orders by status.

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

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->set_status_args();

Код ListTable::set_status_args() WC 7.1.0

private function set_status_args() {
	$status         = trim( sanitize_text_field( wp_unslash( $_REQUEST['status'] ?? '' ) ) );
	$query_statuses = array();

	if ( empty( $status ) || 'all' === $status ) {
		$query_statuses = array_intersect(
			array_keys( wc_get_order_statuses() ),
			get_post_stati( array( 'show_in_admin_all_list' => true ), 'names' )
		);
	} else {
		$query_statuses[] = $status;
		$this->has_filter = true;
	}

	$this->order_query_args['status'] = $query_statuses;
}