Automattic\WooCommerce\Internal\Admin\Orders

ListTable::set_customer_args()privateWC 1.0

Implements filtering of orders by customer.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

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

Код ListTable::set_customer_args() WC 8.7.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;
}