Support

Home Forums Event Espresso Premium ERROR Add a Course Curriculum Section to the “Thank You” Page Using ACF

ERROR Add a Course Curriculum Section to the “Thank You” Page Using ACF

Posted: August 22, 2014 at 6:34 am


NLLP Huset Ove Schroll

August 22, 2014 at 6:34 am

Hello! I have installed ACF, the Flexible Field and the Repeater. Have followed the instructions. When entering the “Thank You” page I get “Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘ee_course_materials_area_thank_you_page’ not found or invalid function name in /home/www/test.kamina.dk/wp2_ee4/wp-includes/plugin.php on line 470
Seeing that the error is there I guess that I have places the snippet the correct place.
What to do?


Josh

  • Support Staff

August 22, 2014 at 2:29 pm

Hi there,

Did you use this tutorial:

https://eventespresso.com/wiki/add-course-curriculum-events-using-advanced-custom-fields/

If so, you’ll want to make sure that you have Event Espresso 4.3 or higher. The AHEE__thank_you_page_registration_details_template__after_registration_table_row action hook (which is parameter 1 in your error) was added in Event Espresso 4.3.


NLLP Huset Ove Schroll

August 22, 2014 at 3:08 pm

Hello!
Thank you for getting back that quick.
Yes I went through the tutorial more than once.
After 2 hours I found an error in your snippet code.
I´m new to coding, ACF and wordpress and it would save me a lot of time if the example codes are working. Thought I did something wrong.

In line 1 of the snippet it says:
function ee_course_materials_section_thank_you_page($registration)

It worked for me after changing the word “session” to “area” as in the last line. (ee_course_materials_area_thank_you_page)

Does that make sense?

I guess it would be helpful to others to mention in the tutorial, that
the “images return value” has to be URL (not the default object).

Best Thomas


NLLP Huset Ove Schroll

August 22, 2014 at 3:23 pm

And where can I find a list with AHEE__ codes?

best Thomas


Josh

  • Support Staff

August 22, 2014 at 5:11 pm

Hi Thomas,

Thanks for pointing out the typo in the code. It’s been fixed. You can find a few lists of hooks in these articles:

https://eventespresso.com/wiki/ee4-thank-page-actions-filters-hooks/

https://eventespresso.com/wiki/ee4-single-page-checkout-page-actions-filters/

The support post ‘ERROR Add a Course Curriculum Section to the “Thank You” Page Using ACF’ 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