Site icon Hip-Hop Website Design and Development

Conditional label Woocommerce archive [unsolved]

I am constructing a webshop with WordPress and Woocommerce. On the productoverview (archive) of a productcategories I need to present a label if the product has the class ‘New’. The next code works on the product-single, nevertheless it will not present on the productcategory-page if I add the motion in content-product.php.

I used the next code to point out a label on the one product web page and it really works because it ought to.

perform resign_article_is_new(){

    if ( is_product() && has_term( 'Nieuw', 'product_cat' ) ) {
        echo '<p class="new-lable">New</p>';
    }
}
add_action( 'resign_new_article', 'resign_article_is_new');

Once I need to present the label on the productcategory overview I used this, however the label would not seem.

do_action('resign_new_article');

Hope you possibly can inform me what I am doing fallacious