• Resolved grifas

    (@grifas)


    Hi guys. Such an awesome plugin. Thank you. But want to ask you, if there is a way to make Product name clickable. When we click on product name, it should redirect to product page. Is that possible?

    https://prnt.sc/vnaf3z

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter grifas

    (@grifas)

    Found this solution:

    Add this code to child-theme functions.php

    add_filter( 'woocommerce_order_item_name', 'display_product_title_as_link', 10, 2 );
    function display_product_title_as_link( $item_name, $item ) {
    
    $_product = get_product( $item['variation_id'] ? $item['variation_id'] : $item['product_id'] );
    
    $link = get_permalink( $_product->id );
    
    return '<a href="'. $link .'"  rel="nofollow">'. $item_name .'</a>';
    
    }
    hannah

    (@hannahritner)

    Hi @grifas,
    Glad you were able to create a resolve! Let us know if there’s anything else we can help you with!

    Best,
    Hannah

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Clickable name product’ is closed to new replies.