With the following code I populate a select dropdown item in Admin product page which I add, through a function (in my theme's functions.php). For instance, I managed to get the list of all my product attributes (taxanomy):
<?php
$attributes = wc_get_attribute_taxonomies();
if($attributes) {
foreach ( $attributes as $attribute ) {
echo '<option value="'. $attribute->attribute_id .'">' . $attribute->attribute_label . '</option>';
}
}
?>
Any idea how the get the term names (labels) and ids of all the terms under a specific product attribute (taxanomy), for example pa_test
?