Oh thanks, I was looking for a function to do that but couldn’t find one… I will switch to that instead!
Thanks for your help Mihai.
Hi Mihai,
Thanks for the reply, I took at look at the plugin functions.php file and that was the function I ended up using, so good to know I am on the same track.
I couldn’t figure out how to get the affiliate ID from a custom slug, so wrote a custom query to do the lookup on the wp_slicewp_affiliate_meta table.
Thanks for your help