我想知道你是否可以帮助我。我有以下代码,在 woocommerce 中向我的网站上的新访问者显示我的产品简短描述上方的文本。根据文本执行所需的操作(创建帐户)后,我想隐藏不再需要的文本。
我真的很感激任何帮助。
add_filter('woocommerce_short_description','ts_add_text_short_descr');
function ts_add_text_short_descr($description){
echo 'To check if this item qualifies for a discount <a href="https://www.livestainable.co.za/my-account-2/"><u><strong>Log In or Create</strong></u></a> an account.</br></br>';
return $description.$text;
}