Support

Home Forums Event Espresso Premium transaction paid triggers affiliateWP- Howto send status paid from the beginning

transaction paid triggers affiliateWP- Howto send status paid from the beginning

Posted: November 25, 2024 at 3:19 pm

Viewing 6 reply threads


Markahn

November 25, 2024 at 3:19 pm

We have to imediately show that a course was booked to the coresponding affiliate. Because we check payment externally we don´t need to wait for a transaction in EE to be paid. How can we define the transaction as paid from the beginning or at least send this status to affiliatewp recommendations when the booking is done?


Tony

  • Support Staff

November 26, 2024 at 7:53 am

Hi there,

We don’t have any filters within the WP Affiliate add-on that allows you to set you own values to be used, however the add-on hooks in to do all of the functions we do now, so you can hook in with your own code to change the referral as you see fit.

Take a look at \eea-affiliate-wp\src\EED_Affiliate_WP.module.php to see how the add-on does what it does currently and then you can add your own functions to either the same hooks at a later priority, or a different hook if you want to set the values earlier on in the registration process. THe above file will give you a base to work from with your own hook, I do NOT recommend modifying the code within the add-on directly.

For example, if you want to run the process earlier you could hook into AHEE__EE_Single_Page_Checkout__process_attendee_information__end and set the referral at that point with whatever values you prefer. Most of the add-on’s functions check to see if the referral status is ‘paid’ before doing anything and if it is they do nothing.


Markahn

November 27, 2024 at 9:11 am

Thanks, that´ll probably lead to solve a big part of my problem.


Markahn

November 28, 2024 at 11:31 am

Hi Tony, sorry to ask here, but where do I find that AHEE__EE_Single_Page_Checkout__process_attendee_information__end?


Markahn

November 28, 2024 at 11:52 am

its definition


Markahn

November 28, 2024 at 12:35 pm

forget about my question before. got it


Tony

  • Support Staff

November 29, 2024 at 2:55 am

Hi there,

Just for any future readers of this thread, the above hook is in:

\event-espresso-core\modules\single_page_checkout\reg_steps\attendee_information\EE_SPCO_Reg_Step_Attendee_Information.class.php

Defined:

do_action('AHEE__EE_Single_Page_Checkout__process_attendee_information__end', $this, $valid_data);

$this in that context will be the EE_SPCO_Reg_Step_Attendee_Information instance.

Viewing 6 reply threads

The support post ‘transaction paid triggers affiliateWP- Howto send status paid from the beginning’ 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