Make all affiliate external buttons only for logged users

Guests will see login/register popup when they click on any affiliate button of theme. To do this, use next snippet in Theme option – general – js code in footer

<script>
jQuery(document).ready(function($) {
$('body:not(.logged-in) .re_track_btn').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