Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableQuery::process_orderby()privateWC 1.0

Generates the ORDER BY clause.

{} Это метод класса: OrdersTableQuery{}

Хуков нет.

Возвращает

null. Ничего.

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

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

Код OrdersTableQuery::process_orderby() WC 6.9.1

private function process_orderby(): void {
	// 'order' and 'orderby' vars.
	$this->args['order'] = $this->sanitize_order( $this->args['order'] ?? '' );
	$this->sanitize_order_orderby();

	$orderby = $this->args['orderby'];

	if ( 'none' === $orderby ) {
		$this->orderby = '';
		return;
	}

	$orderby_array = array();
	foreach ( $this->args['orderby'] as $_orderby => $order ) {
		$orderby_array[] = "{$_orderby} {$order}";
	}

	$this->orderby = $orderby_array;
}