简体   繁体   English

在显示的文本中添加 http 链接 - PHP(WooCommerce 电子邮件)

[英]Adding http link inside displayed text - PHP (WooCommerce Email)

Im trying to add a link inside some PHP text that displays in an email sent out by woo commerce.我试图在一些 PHP 文本中添加一个链接,该链接显示在 woo commerce 发送的电子邮件中。 I'd like to add a link through to my website so that where it says XXXXX below, it says 'here.'我想在我的网站上添加一个链接,以便在下面显示 XXXXXX 的地方显示“此处”。 but I must be doing something wrong as the code crashes and can't be read properly with all the various things I'm trying such as print and echo.但是我一定是做错了什么,因为代码崩溃了,并且无法通过我正在尝试的所有各种事情(例如打印和回声)正确读取。

<p><?php _e( "Your order has been received and is now being processed. We will send you another email shortly to let you know that your order has been shipped. If you'd like to track the status of your order, you can by clicking XXXXXXX. Your order details are shown below for your reference:", 'woocommerce' ); ?></p>

Thank you!谢谢!

而不是这样,你可以将你的字符串分成两部分,如下所示

<p><?php _e( "Your order has been received and is now being processed. We will send you another email shortly to let you know that your order has been shipped. If you'd like to track the status of your order, you can by clicking ", 'woocommerce' ); ?><a href="http://example.com" title="">XXXXXXX</a><?php _e( "Your order details are shown below for your reference:", 'woocommerce' ); ?></p>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM