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

jQuery(document).ready(function($) {
$('body:not(.logged-in) .re_track_btn').each(function(index){

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