Fixed wc_get_product_terms() when using menu_order ordering

This commit is contained in:
Claudio Sanches 2017-01-11 16:14:28 -02:00
parent 91c68d211f
commit 9f1e0c46fa
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ function wc_get_product_terms( $product_id, $taxonomy, $args = array() ) {
}
} elseif ( ! empty( $args['orderby'] ) && 'menu_order' === $args['orderby'] ) {
// wp_get_post_terms doesn't let us use custom sort order.
$args['include'] = wc_get_object_terms( $product_id, $taxonomy, 'id' );
$args['include'] = wc_get_object_terms( $product_id, $taxonomy, 'term_id' );
if ( empty( $args['include'] ) ) {
$terms = array();