wp_get_post_terms Order by not working
My code is here
query_posts(array('post_type' => 'product','post__in' => $product_ids,));
while (have_posts()) : the_post();
global $post;
$args = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');
$product_terms = wp_get_object_terms($post->ID, 'productcategory',$args);
if(!empty($product_terms)){
if(!is_wp_error( $product_terms )){
echo '<ul>';
foreach($product_terms as $term){
echo '<li><a href="'.get_term_link($term->slug, 'product').'">'.$term->name.'</a></li>';
}
echo '</ul>';
}
}
endwhile;
I read read on the documentation that its support array $args to make order the terms by "name", ASC however I don't know why it wont work