Skip to content

Instantly share code, notes, and snippets.

@JudeRosario
Created January 29, 2015 10:20
Show Gist options
  • Save JudeRosario/5fa9322a270e7fe874ed to your computer and use it in GitHub Desktop.
Save JudeRosario/5fa9322a270e7fe874ed to your computer and use it in GitHub Desktop.
Integrate WP - Affiliates Manager + Contact Form 7 + Membership
private function add_hooks () {
// Modify here if changing contact form
add_action('wpcf7_mail_sent',array($this,'integrate_affiliate_code',));
}
private function integrate_affiliate_code () {
// Use a jsonHandler to manually add 5 Pounds to the affiliate
$jsonHandler = new WPAM_Util_JsonHandler;
// Modify here if you want to increase payouts or switch affiliate plugins
$jsonHandler->addTransaction($affiliate, 'credit',5, "Consultation Referral");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment