Support

Home Forums Event Espresso Premium Getting custom questions and answers on to the "Payment Options" and "Thank You"

Getting custom questions and answers on to the "Payment Options" and "Thank You"

Posted: June 2, 2015 at 5:31 am


Ng Jia Xiang

June 2, 2015 at 5:31 am

I just need to get all my custom questions and answers to display on the “Payment Options” and “Thank You” pages. I have a site specific plugin set up, just can’t figure out how to load the custom questions and answers via actions.
Using AHEE__thank_you_page_registration_details_template__after_registration_details and AHEE__registration_page_payment_options__after_spco_payment_options_header in this way:
function custom_questions_answers_thank_you_page() {
//somehow display custom questions here
add_action( ‘AHEE__thank_you_page_transaction_details_template__after_transaction_details’, ‘custom_questions_answers_thank_you_page’, 10, 1 );


Josh

  • Support Staff

June 3, 2015 at 9:11 am

Example code here:

https://gist.github.com/Pebblo/e89c629e55b24535b54f


Ng Jia Xiang

June 3, 2015 at 5:42 pm

Thanks again for the code!
Is there a way to retrieve the registration object on the payment options page?


Dean

June 4, 2015 at 5:35 am

Hi,

function afunction($event, $this) {
  echo "<pre>" . print_r( $this, 1 ) . "</pre>";
}
add_action('AHEE__EE_SPCO_Reg_Step_Payment_Options__generate_reg_form__event_requires_payment', 'afunction', 10, 2);

This hooks into the payment page and the $this object contains a large amount of data, including registration info.

You will need to use some of the helper methods from the registration class to get at that data though as it is protected.

The support post ‘Getting custom questions and answers on to the "Payment Options" and "Thank You"’ 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