• Resolved OC WordPress Web Designer

    (@oc-wordpress-web-designer)


    I am using the code below to create an echo statement for a product category. However my question is how to make that same statement work only for one product attribute ( with the product attribute name and slug being: candy)?

    function productinfotooltip() {
    if ( has_term( ‘scrunch-half-only’, ‘product_cat’ ){

    echo(‘blah blah blah’);
    }

    }

    add_action(“woocommerce_before_single_variation”, “productinfotooltip”, 60);

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How To Make An Echo Statement For One Product Attribute Only’ is closed to new replies.