I need to add some text after the price on the woocommerce single product pages. I know how to do this with this code
add_filter( 'woocommerce_get_price_html', 'custom_price_message' );
function custom_price_message( $price ) {
$vat = ' (plus VAT)';
return $price . $vat;
}
But I need the text (plus VAT) to be a clickable link that sends the customer to one of my pages. How can I do this? Thank you for your help.
Assuming I understand your question properly, you just need to do something like the following:
$vat = ' <a href="#link">(plus VAT)</a>';
return $price . $vat;