• Hi guys, been using the plugin for a short while now and thanks for the development, just wondering if there would be a way to actually link to the products from the emails, specifically the “order completed” mail as it would be handy to let the user click the product to return to the product page.
    Thanks in advance
    Marko

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey,
    This isn’t something that our plugin controls or provides settings for. You would have to edit the woocommerce order table output to add a link.

    Ben

    Thread Starter marko2002

    (@marko2002)

    Ah, gotchya, thanks for that ??

    Thread Starter marko2002

    (@marko2002)

    Just in case anyone else looking for same, adding below to functions works a treat ??

    add_filter( 'woocommerce_order_item_name', 'display_product_title_as_link', 10, 2 );
    function display_product_title_as_link( $item_name, $item ) {
    
        $_product = wc_get_product( $item['variation_id'] ? $item['variation_id'] : $item['product_id'] );
    
        $link = get_permalink( $_product->get_id() );
    
        return '<a href="'. $link .'"  rel="nofollow">'. $item_name .'</a>';
    }
    • This reply was modified 3 years, 9 months ago by marko2002.
    hannah

    (@hannahritner)

    Thanks for sharing, @marko2002!

    All the best,
    Hannah

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hyperlink to products?’ is closed to new replies.