隐藏Woocommerce产品页面中特定产品标签的按钮

I have Woocommerce WebSite. I need a php code to hide part of html in product details page by a certain Product Tag.

For example if product include "abc" product tag, then hide an html button. I need this code for product details page only.

This can be done with Wordpress has_term() conditional function for the 'product_tag' custom taxonomy, like in this example:

// Output some code except for "abc" product tag
if( ! has_term( 'abc', 'product_tag', get_the_id() ) ){
    ?>
    <a href="#">This product has not "abc" tag</a>
    <?php
}

The button will be hidden from products that have "abc" product tag…