Hi @lubo2019,
I understand you would like to add a link to the purchased product in the “New order” email. It sounds like you can achieve that with some custom code:
https://wordpress.org/support/topic/how-to-add-the-product-link-of-the-woocommerce-order-message/#post-13032849
If the code doesn’t work or if you do require more help with the actual coding, we’d recommend hiring a developer or one of the customization experts listed at https://woocommerce.com/customizations/.
Cheers.
Hi @lubo2019!
Since this isn’t a core feature of WooCommerce, you can still achieve it through a plugin or custom coding.
Searching, I found a couple of plugins that could be helpful to your case; with them, you can add links or URLs to your email notifications.
* https://woocommerce.com/products/email-customizer-pro
* https://woocommerce.com/products/email-customizer-for-woocommerce
If you have any pre-sales questions about them, I recommend creating a ticket here:
https://woocommerce.com/my-account/create-a-ticket/
Also, I found some articles that contain some code that could help you to achieve what you want; you can take a look at them for pointers:
* https://stackoverflow.com/questions/22375483/woocommerce-add-product-link-in-processing-order-email
* https://www.vanbodevelops.com/tutorials/add-a-link-back-to-the-order-in-woocommerce-new-order-notifications-email
* https://themes.email/woocommerce/product-links-in-woocommerce-order-emails.html
I hope this helps!
Thank you very much for the prompt answer I will take a look at your suggestions…;-)
Just to let you know this code works perfect. Thank you very much again…;-)
https://themes.email/woocommerce/product-links-in-woocommerce-order-emails.html
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>';
}