Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WC_Query::append_product_sorting_table_join( string $sql )

Join wc_product_meta_lookup to posts if not already joined.


Description Description


Parameters Parameters

$sql

(Required) SQL join.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/class-wc-query.php

	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;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.