Support

Home Forums Event Espresso Premium Ticket Link on Thank You page

Ticket Link on Thank You page

Posted: May 22, 2019 at 10:06 am

Viewing 4 reply threads


engineroomweb

May 22, 2019 at 10:06 am

Appologies if this is posted elsewhere.

I am trying to use – https://gist.github.com/Pebblo/525890c30baa7e207e4f

But there is no link on the Thank You page when testing it.

The action hook is working as I can echo a test string onto the page but there is no button.

I have checked the error log and have nothing there.

Thanks for any help.

Event Espresso Version – 4.9.80.p
Event Espresso – Ticketing (EE 4+) Version – 1.0.9.p


Tony

  • Support Staff

May 22, 2019 at 11:19 am

Hi there,

I’ve just added that to a site to confirm it still works and its working for me:

https://monosnap.com/file/V4rNAGRl51k8Ml2NHqvuFgCWuXerZQ

The ticket link will only show if the registration has been ‘Approved’, so start by double checking the registration is Approved and not another status.


engineroomweb

May 23, 2019 at 7:37 am

This reply has been marked as private.


Tony

  • Support Staff

May 23, 2019 at 8:01 am

Your closure isn’t being passed $transaction so at this point if ( $transaction instanceof EE_Transaction )…. $transaction is undefined in that function and therefore cannot be an instance of EE_Transation so nothing runs.

The AHEE__thank_you_page_overview_template__content hook is passed the transaction and therefor you need:

add_action( 'AHEE__thank_you_page_overview_template__content', function($transaction){

Example of your code running just fine with the above, although I commented our the get_field code on my site – https://monosnap.com/file/qZdQzRMzkbrMneUdOH6EcQHfIq2B0U


engineroomweb

May 23, 2019 at 9:44 am

Perfect, thank you! 🙂

Viewing 4 reply threads

The support post ‘Ticket Link on Thank You page’ 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