Merge pull request #14291 from woocommerce/fix/dupe-cats

Apply distinct to term id only
This commit is contained in:
Claudio Sanches 2017-04-12 12:18:34 -03:00 committed by GitHub
commit 8151eb1320
1 changed files with 1 additions and 1 deletions

View File

@ -507,7 +507,7 @@ function wc_terms_clauses( $clauses, $taxonomies, $args ) {
}
// Query fields.
$clauses['fields'] = 'DISTINCT ' . $clauses['fields'] . ', tm.meta_value';
$clauses['fields'] = 'DISTINCT t.term_id, tm.meta_value, ' . $clauses['fields'];
// Query join.
if ( get_option( 'db_version' ) < 34370 ) {