In my wordpress website I am trying to hide download button from non logged-in user and add a custom HTML to that section. My current code is hiding the download button but not displaying the text. I am a beginner PHP programmer so any help is really appreciated.
I am using this code:
<style>
<?php if(! is_user_logged_in() ) : ?>
.product-purchase-box{
display: none;
$(".single-product-widget").text("Please Login/Register To Download");
}
<?php endif; ?>
</style>