Support

Home Forums Event Espresso Premium no results…

no results…

Posted: May 6, 2013 at 4:22 pm


Powers

May 6, 2013 at 4:22 pm

Mid Last year on the support forum around August you mentioned and Affiliate plugin was available. I have a training company which has students which I would like to have them refer their friends to me and be able to track the referral and pay the students a fee for the referral. How can I get this plugin. I looked at a third party plugin called WP Affiliate Platform but was unsure how it would integrate with the Event Espresso. Since you said you had this feature available in the the 3.x version how may I obtain it.


Josh

  • Support Staff

May 7, 2013 at 10:15 am

Hi there,

There is a way to integrate the WP Affiliate plugin with Event Espresso. There was a hook added to Event Espresso that makes this possible.

I’ll need to check with Seth on this one because the code I have to make this works looks like it needs to be updated.


Powers

May 15, 2013 at 6:42 pm

Has Seth Gotten Back to you I call him 2 weeks ago about this and have not had a response. I need to get this up ASAP. I email you Josh directly and posted on forum but still have not received any update yet. How can this work and what needs to be done.

Thanks


Josh

  • Support Staff

May 15, 2013 at 7:46 pm

Hi there,

Here is some example code that can be added to either the custom functions file (of the custom files add-on) -or- into the WP theme’s functions.php file that hooks to the WP Affiliate plugin:

function espresso_track_successful_sale($payment_data){
    $sale_amt = $payment_data['total_cost']; //TODO - The commission will be calculated based on this amount
    $unique_transaction_id = $payment_data['txn_id']; //TODO - The unique transaction ID for reference
    $email = $payment_data['email']; //TODO - Customer email for record
    $referrer = $_COOKIE['ap_id'];
    do_action('wp_affiliate_process_cart_commission', array("referrer" => $referrer, "sale_amt" =>$sale_amt, "txn_id"=>$unique_transaction_id, "buyer_email"=>$email));

    return $payment_data;
}
add_filter('filter_hook_espresso_update_attendee_payment_data_in_db','espresso_track_successful_sale', 20);

The support post ‘no results…’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso