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.
Return Return
(string)
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; }