2016-11-25 91 views
-6

我已經在WordPress中的我的functions.php文件中添加了一個腳本,以在Woocommerce「感謝您」頁面生成其他文本。

** 
* Custom text on the receipt page. 
*/ 
function isa_order_received_text($text, $order) { 
$new = $text . ' A receipt has been sent to you via email.Please submit your ticket here:https://google.com'; 
return $new; 
} 

部分文字是另一頁的鏈接。

Please submit your ticket here:https://google.com';

但是,鏈接不顯示作爲前端突出顯示的/可點擊URL。我該如何解決?

+0

哎呀!真是個傻瓜!有時我會驚奇自己!謝謝。 –

回答

0

使用鏈接你的PHP字符串中: $new = $text . ' A receipt has been sent to you via email.Please submit your ticket <a href="https://google.com">here</a>';

+0

謝謝! –

-2
$new = $text . ' A receipt has been sent to you via email.Please submit your ticket <a href="https://google.com">here (https://google.com)</a>'; 
return $new; 
+0

-1是什麼原因? – Auris

-1

試試這個

** 
* Custom text on the receipt page. 
*/ 
function isa_order_received_text($text, $order) { 
$new = $text . ' A receipt has been sent to you via email.Please submit your ticket <a href="https://google.com">here</a>'; 
return $new; 
} 
相關問題