![](/img/trans.png)
[英]Add Text After the Price in WooCommerce Product Per Product ID/WP
[英]Add link after woocommerce product price
我需要在woocommerce單一產品頁面上的價格之后添加一些文字。 我知道如何使用此代碼執行此操作
add_filter( 'woocommerce_get_price_html', 'custom_price_message' );
function custom_price_message( $price ) {
$vat = ' (plus VAT)';
return $price . $vat;
}
但我需要文本(加上增值稅)是一個可點擊的鏈接,將客戶發送到我的一個頁面。 我怎樣才能做到這一點? 謝謝您的幫助。
假設我理解你的問題,你只需要做如下的事情:
$vat = ' <a href="#link">(plus VAT)</a>';
return $price . $vat;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.