Support

Home Forums Event Espresso Premium EE3 Hook or Template for Payment Confirmation

EE3 Hook or Template for Payment Confirmation

Posted: July 12, 2018 at 2:42 pm


sosfirstaid.ca

July 12, 2018 at 2:42 pm

Hi there,

I want to add some Javascript code that outputs when the payment is confirmed. This is so it sends a datalayer event, therefore allowing us to track this process as a conversion.

Can you point me in the right direction to achieve this?

Thanks


Josh

  • Support Staff

July 12, 2018 at 2:51 pm

Hi,

In Event Espresso 3 there is:

action_hook_espresso_track_successful_sale
and
action_hook_espresso_email_after_payment

You could probably use either of the above.


sosfirstaid.ca

July 12, 2018 at 8:17 pm

Thank you Josh.

Do you have an example PHP function that uses this? What parameters are passed?


Josh

  • Support Staff

July 13, 2018 at 9:03 am

The source has the parameters:

https://github.com/eventespresso/event-espresso-legacy/blob/master/gateways/process_payments.php#L139

Here’s an example of how the hook can be used:
https://gist.github.com/joshfeck/cfbbc6641b8da7e7005fc9b388f11e87

The support post ‘EE3 Hook or Template for Payment Confirmation’ 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