Merge pull request #14291 from woocommerce/fix/dupe-cats
Apply distinct to term id only
This commit is contained in:
commit
8151eb1320
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in New Issue