I have the below code that shows text above my product short description in woocommerce to a new visitor on my website. After performing the action (Creating an account) required based on the text, I would like to hide the text as it is no longer needed.
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;
}