Last active
May 22, 2022 20:54
-
-
Save amdrew/cde0ef1b2b0f23671eea to your computer and use it in GitHub Desktop.
AffiliateWP - Affiliate Info. Retrieve affiliate information via PHP function calls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$info = affiliatewp_affiliate_info()->functions; | |
$name = $info->get_affiliate_name(); | |
$email = $info->get_affiliate_email(); | |
$website = $info->get_affiliate_website(); | |
$bio = $info->get_affiliate_bio(); | |
$gravatar = $info->get_affiliate_gravatar(); | |
$twitter = $info->get_twitter_username(); | |
$facebook = $info->get_facebook_url(); | |
$googleplus = $info->get_googleplus_url(); | |
$username = $info->get_affiliate_username(); | |
// Example: Show the affiliate's name | |
echo $name; | |
// Example: Only show a banner if an affiliate referred the user | |
if ( affiliatewp_affiliate_info()->functions->get_affiliate_id() ) { | |
echo 'Your site representative is ' . $name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment