Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor realdrp

    (@realdrp)

    Hey Colin,

    I apologize for the delay in my reply. At this time recipe key does not integrate with WooCommerce but I’ve added a note for myself and will work it into future releases. Keep checking back!

    Thread Starter ecohostingservices

    (@ecohostingservices)

    Hi
    I have a work around by using your stylesheet and the following code below, which was inserted into WooCommerce’s Single Product meta.php file. This file was a template so I copied it to my theme.

    Loop through each product tag for the current product

    if( count($terms) > 0 ){
        foreach($terms as $term){
            $term_id = $term->term_id; // Product tag Id
            $term_name = $term->name; // Product tag Name
            $term_slug = $term->slug; // Product tag slug
            $term_link = get_term_link( $term, 'product_tag' ); // Product tag link
    
            // Set the product tag names in an array
            $output[] = '<span class="irk-'.$term_slug.'" ></span><a href="'.$term_link.'">'.$term_name.'</a>';
        }
        // Set the array in a coma separated string of product tags for example
        $output = implode( ' ', $output );
    
        // Display the coma separated string of the product tags
        echo '<div class="recipe-legend-wrap">';
        echo $output;
        echo '</div>';

    The code was found on the internet on another forum asking about adding classes to the Tags for each product.

    Colin

    Plugin Contributor realdrp

    (@realdrp)

    Recipe Key Premium works with WooCommerce Product Categories and Tags as of v0.9.0

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Woocommerce Product Tags’ is closed to new replies.