Get term name from term ID?

The function get_term_by() would allow you to get the taxonomy term name from the id.

$quantityTermObject = get_term_by( 'id', absint( $quantityTerms ), 'quantity_category' );
$quantityTermName = $quantityTermObject->name;

Leave a Comment