I need to get the product link into out of stock emails sent to admin.
This code does not have the desired result even though I am, as far as I know, using the right filter hook? Any advice?
add_filter('woocommerce_email_content_no_stock', 'add_product_url_to_out_of_stock_email', 10, 2);
function add_product_url_to_out_of_stock_email( $message, $product ) {
global $product; // with or without this is the same result
return $message ."<br>\n". get_edit_post_link( $product->get_id() );
}