tracking->get_referral_var () . '/' . affwp_get_affiliate_username (); } else { $permalink = add_query_arg ( affiliate_wp ()->tracking->get_referral_var (), affwp_get_affiliate_username (), $permalink ); } } else { if ($affwp_active_pretty) { $permalink .= affiliate_wp ()->tracking->get_referral_var () . '/' . affwp_get_affiliate_id (); } else { $permalink = add_query_arg ( affiliate_wp ()->tracking->get_referral_var (), affwp_get_affiliate_id (), $permalink ); } } return $permalink; } }