WordPress at Your Fingertips
function is not described

WC_Query::append_product_sorting_table_join() private WC 1.0

Join wc_product_meta_lookup to posts if not already joined.

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

No Hooks.

Return

String.

Usage

// private - for code of main (parent) class only
$result = $this->append_product_sorting_table_join( $sql );
$sql(string) (required)
SQL join.

Code of WC_Query::append_product_sorting_table_join() WC 5.6.0

private function append_product_sorting_table_join( $sql ) {
	global $wpdb;

	if ( ! strstr( $sql, 'wc_product_meta_lookup' ) ) {
		$sql .= " LEFT JOIN {$wpdb->wc_product_meta_lookup} wc_product_meta_lookup ON $wpdb->posts.ID = wc_product_meta_lookup.product_id ";
	}
	return $sql;
}