Support

Home Forums Event Espresso Premium WP Affiliate Integration

WP Affiliate Integration

Posted: January 11, 2013 at 12:41 pm


Douglas Nelson

January 11, 2013 at 12:41 pm

I am trying to setup the WP Affiliate plugin and was wondering if you had any documentation on how to set this up?


Jonathan Wilson

January 11, 2013 at 3:00 pm

Hi Douglas,

You need to visit this page for WP Affiliate documentation: http://www.tipsandtricks-hq.com/wordpress-affiliate/

We don’t support the plugin. We use it for our affiliate program for Event Espresso.


Douglas Nelson

January 14, 2013 at 12:14 pm

Hi Jonathan,

I have reviewed the code that is required for this and looks like I need to get the unique transaction id:
$unique_transaction_id = “Txn-ID”; //TODO – The unique transaction ID for reference

How do I find that unique transaction id or what should I put in this field? It is in reference to this post: http://www.tipsandtricks-hq.com/wordpress-affiliate/api-awarding-commission-via-wordpress-hook-501

Thanks,
Doug


Seth Shoultes

  • Support Staff

January 21, 2013 at 11:19 pm

Hi Douglas, Very sorry for the delay. I have written a quick example of how to add support for this in Event Espresso version 3.1.29.1 and 3.1.30. However, support for this will be added by default in Event Espresso version 3.1.31.

You can add the following code to your theme functions.php file.

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);


Seth Shoultes

  • Support Staff

January 21, 2013 at 11:28 pm

Please let us know if that works for you.


Douglas Nelson

January 30, 2013 at 1:47 pm

The above code worked Well Thank you for thant.


Douglas Nelson

January 30, 2013 at 1:49 pm

Now i have another issue i hope you can help me about that as well 🙂

My issue is, when a new user is registered by any affiliate id, and his payment or sale amount was charged to his card but his card was declined and payment was not confirmed , my system will still payout commission on that unconfirmed sale, Do you understand what i mean? any suggestion or solution please let me know thank you. I would really thankful.


Leland Zaremba

February 1, 2013 at 2:36 pm

Good stuff Seth! Thanks.


Chris Reynolds

  • Support Staff

February 5, 2013 at 11:14 am

when a new user is registered by any affiliate id, and his payment or sale amount was charged to his card but his card was declined and payment was not confirmed , my system will still payout commission on that unconfirmed sale

That sounds like something happening in the WP Affiliate system rather than Event Espresso. I would contact them for support on that issue, but please post back what you find as we’d be interested in knowing what the solution is.


Douglas Nelson

February 6, 2013 at 9:24 am

Here is WP Affiliate response to my question:

That means that other plugin is incorrectly calling affiliate plugin’s commission awarding API. The other plugin (the one doing the transaction) need to make sure that it only notifies the affiliate plugin of a sale when it is a SUCCESSFUL transaction. The affiliate plugin doesn’t need to know anything other than when a successful transaction has been processed. Read this post which will help you see what I mean:
http://www.tipsandtricks-hq.com/wordpress-affiliate/integrating-the-wp-affiliate-software-with-a-3rd-party-plugin-61

We don’t have any official integration with the plugin you mentioned. So I don’t know the details of what the developer did to integrate with our plugin. However, if you share the above details/info with the developers of that plugin, they will know what to do to fix their plugin.


Seth Shoultes

  • Support Staff

February 15, 2013 at 12:17 am

Hmmm. Not sure we can do anything at this point in time. The development is focusing on Event Espresso 3.2 and I really can’t take them away from that to help with third party plugin integrations.

If you haven’t done so already, you might consider posting this at jobs.eventespresso.com.

The support post ‘WP Affiliate Integration’ 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