Support

Home Forums Event Espresso Premium EE4 Thank You Page Template Hook?

EE4 Thank You Page Template Hook?

Posted: June 29, 2014 at 8:23 pm

Viewing 4 reply threads


Paul Doyle

June 29, 2014 at 8:23 pm

Hi,

Is it possible to add a filter to change the location of the “Thank You” template here

‘/shortcodes/espresso_thank_you/templates/payment_overview.template.php’

So I can have an editable version in my theme folder? Similar to this…

add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', 'my_custom_ticket_selector_template_location');

I see in EES_Espresso_Thank_You.shortcode.php there is

<code>public static function set_definitions() {
  define( 'THANK_YOU_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets' . DS );
  define( 'THANK_YOU_TEMPLATES_PATH', str_replace( '\\', DS, plugin_dir_path( __FILE__ )) . 'templates' . DS );
}</code>

and

EE_Registry::instance()->REQ->add_output( EEH_Template::display_template( THANK_YOU_TEMPLATES_PATH . 'payment_overview.template.php', $template_args, TRUE ));

I’m a little out of my depth here as you can probably tell, but is there a way I can add a filter in my functions.php to set 'THANK_YOU_TEMPLATES_PATH' to `get_stylesheet_directory()’ ?


Paul Doyle

June 29, 2014 at 8:28 pm

Ouch! Sorry the formatting on all that came out a little crazy .. So that’s not how the “code” button should be used then :-/


Lorenzo Orlando Caum

  • Support Staff

June 30, 2014 at 5:42 am

Hi Paul,

Eventually you’ll be able to move a copy of the templates to the uploads/espresso folder and they’ll just work. What are you trying to change on the Payment overview page?

For example, are you trying to hide some content or change some of the messaging?


Lorenzo


Paul Doyle

July 1, 2014 at 1:18 pm

Hi Lorenzo, thanks for the reply.

I need to remove most of the content but I don’t just want to hide it with css. I can always just delete the shortcode from the Thank You page, which is probably what I’ll do if there isn’t an easy way to put a copy of the template in my theme.

I’m using the Translation Loco plugin to change the “language” of the messages and labels etc as I’m using EE4 for classes and courses bookings rather than Tickets and events… which is working out very well after a bit of filename changing.


Lorenzo Orlando Caum

  • Support Staff

July 1, 2014 at 3:41 pm

The issue is that edits to core files will be lost on a software update. If you remove the shortcode then Event Espresso will show a warning in the WordPress admin screens.

Why wouldn’t hiding content with CSS work?

The messaging on the page and in Event Espresso can be changed using a gettext filter or a plugin as you shared:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#plugins


Lorenzo

Viewing 4 reply threads

The support post ‘EE4 Thank You Page Template Hook?’ 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