WooCommerce has a built in
product_tag url filter as such:
Bringing back all the
product_tags with the given slug in the url.
I am trying to do something relatively simple, retrieve the name of the
product_tag and put it in a text heading block so the visitor knows what it is filtering.
The only thing I was able to figure out is in my woocommerce template page
woocommerce-page.php is latching onto the global variable
And then putting the product tags slug in a variable.
$producttag = $wp_query->query['product_tag'];
Is this an appropriate way to retrieve the product tag slug? How do I convert the product slug into its actual Name?
Or is there a way to bypass the slug altogether and just get the product tags name?
The only way I found how to get these variables was by looking at
$wp_query, and that only returns the slug.