Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableSearchQuery::__construct()publicWC 1.0

Creates the JOIN and WHERE clauses needed to execute a search of orders.

Method of the class: OrdersTableSearchQuery{}

No Hooks.

Return

null. Nothing.

Usage

$OrdersTableSearchQuery = new OrdersTableSearchQuery();
$OrdersTableSearchQuery->__construct( $query );
$query(OrdersTableQuery) (required)
The order query object.

OrdersTableSearchQuery::__construct() code WC 7.1.1

public function __construct( OrdersTableQuery $query ) {
	$this->query       = $query;
	$this->search_term = "'" . esc_sql( '%' . urldecode( $query->get( 's' ) ) . '%' ) . "'";
}