簡體   English   中英

在顯示的文本中添加 http 鏈接 - PHP(WooCommerce 電子郵件)

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

我試圖在一些 PHP 文本中添加一個鏈接,該鏈接顯示在 woo commerce 發送的電子郵件中。 我想在我的網站上添加一個鏈接,以便在下面顯示 XXXXXX 的地方顯示“此處”。 但是我一定是做錯了什么,因為代碼崩潰了,並且無法通過我正在嘗試的所有各種事情(例如打印和回聲)正確讀取。

<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>

謝謝!

而不是這樣,你可以將你的字符串分成兩部分,如下所示

<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