Wordpress get taxonomy name with slug

taxonomy, wordpress

Solution

<?php 
    $term = get_term_by('slug', $slug, 'category'); 
    $name = $term->name; 
    $id = $term->term_id;
?>

Problem

How can I get a taxonomy id or name with only the taxonomy slug ? I guess I'm looking for the equivalent of `get_term_by()` but for taxonomies. Edit : I must specify that I'm trying to get the tax ID of a WooCommerce product attribute. Thanks

Original source