Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableSearchQuery::__construct()publicWC 1.0

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

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

Хуков нет.

Возвращает

null. Ничего.

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

$OrdersTableSearchQuery = new OrdersTableSearchQuery();
$OrdersTableSearchQuery->__construct( $query );
$query(OrdersTableQuery) (обязательный)
The order query object.

Код OrdersTableSearchQuery::__construct() WC 7.1.1

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