Automattic\WooCommerce\Internal\Admin\Orders

ListTable::set_customer_args()privateWC 1.0

Implements filtering of orders by customer.

Method of the class: ListTable{}

No Hooks.

Return

null. Nothing.

Usage

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

ListTable::set_customer_args() code WC 7.1.0

private function set_customer_args() {
	// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
	$customer = (int) wp_unslash( $_GET['_customer_user'] ?? '' );

	if ( $customer < 1 ) {
		return;
	}

	$this->order_query_args['customer'] = $customer;
	$this->has_filter                   = true;
}