Automattic\WooCommerce\Internal\Admin\Orders

ListTable::set_search_args()privateWC 1.0

Implements order search.

Method of the class: ListTable{}

No Hooks.

Return

null. Nothing (null).

Usage

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

ListTable::set_search_args() code WC 8.7.0

private function set_search_args(): void {
	$search_term = trim( sanitize_text_field( $this->request['s'] ) );

	if ( ! empty( $search_term ) ) {
		$this->order_query_args['s'] = $search_term;
		$this->has_filter            = true;
	}

	$filter = trim( sanitize_text_field( $this->request['search-filter'] ) );
	if ( ! empty( $filter ) ) {
		$this->order_query_args['search_filter'] = $filter;
	}
}