Product Links in
WooCommerce Order Emails

Category: WooCommerce
Product Links in WooCommerce Order Emails
Product Links in WooCommerce Order Emails

To link a product name with its product page in your order emails, open the functions.php file of your child theme and add the following snippet of code:

/**
* Product Links in WooCommerce Order Emails
* More tips: https://themes.email/woocommerce.html
*/

    add_filter('woocommerce_order_item_name', 'woocommerce_order_item_link', 10, 3);

    function woocommerce_order_item_link( $item_name, $item, $bool ) {
        $url = get_permalink( $item['product_id'] ) ;
        return '<a href="'. $url .'">'.$item_name .'</a>'; 
    }

Tutorials

Purchase Email Templates

Each purchase of WET comes with 20 different styles —
and a lifetime of free fresh designs & bug-fix updates.

One purchase for all your future projects.