WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports

DataStore::add_orderby_order_clause() protected WC 1.0

Add order by order SQL clause.

{} It's a method of the class: DataStore{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->add_orderby_order_clause( $query_args, $sql_query );
$query_args(array) (required) (passed by reference — &)
Parameters supplied by the user.
$sql_query(SqlQuery) (required) (passed by reference — &)
Query object.

Code of DataStore::add_orderby_order_clause() WC 5.3.0

<?php
protected function add_orderby_order_clause( $query_args, &$sql_query ) {
	if ( isset( $query_args['order'] ) ) {
		$sql_query->add_sql_clause( 'order_by', $query_args['order'] );
	} else {
		$sql_query->add_sql_clause( 'order_by', 'DESC' );
	}
}