- Edited
I am trying to make the tracking code a link in a WooCommerce email template. The code I'm using is:
<?php
/* translators: %s Order date */
printf(
esc_html__('Tracking number : <a href=\\"https://www.fedex.com/fedextrack/?trknbr=%2$s\\">%2$s</a>"','woocommerce'),
esc_html($shipping_carrier),
esc_html($ups_trackingno)
);
?>
The problem is the email generated by this code looks like this:
Hi Tyler,
Your order has shipped.
Tracking number : <a href=\"https://www.fedex.com/fedextrack/?trknbr=277530011950\">277530011950</a>"
It shows the entire link rather than the tracking code as a link. Any help would be appreciated.