WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports\Variations

DataStore::add_from_sql_params() protected WC 1.0

Fills FROM clause of SQL request based on user supplied parameters.

{} 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_from_sql_params( $query_args, $arg_name );
$query_args(array) (required)
Parameters supplied by the user.
$arg_name(string) (required)
Target of the JOIN sql param.

Code of DataStore::add_from_sql_params() WC 5.3.0

<?php
protected function add_from_sql_params( $query_args, $arg_name ) {
	global $wpdb;

	if ( 'sku' !== $query_args['orderby'] ) {
		return;
	}

	$table_name = self::get_db_table_name();
	$join       = "LEFT JOIN {$wpdb->postmeta} AS postmeta ON {$table_name}.variation_id = postmeta.post_id AND postmeta.meta_key = '_sku'";

	if ( 'inner' === $arg_name ) {
		$this->subquery->add_sql_clause( 'join', $join );
	} else {
		$this->add_sql_clause( 'join', $join );
	}
}