Make coupons only for logged users

If you use Coupon functions of theme, maybe you will need to make all coupons visible only for logged users. Guests will see login/register popup when they click on Reveal button. To do this, use next snippet in Theme option – general – js code in footer

<script>
jQuery(document).ready(function($) {
$('body:not(.logged-in) .masked_coupon:not(.expired_coupon)').each(function(index){
$(this).addClass('act-rehub-login-popup').removeClass('masked_coupon').removeAttr('data-clipboard-text');
});
});
</script>

Also, don’t forget to enable Login modal in theme option – user option and enable registration on site in settings – general. See also