Support

Home Forums Event Espresso Premium Add text to Payment Options page

Add text to Payment Options page

Posted: October 8, 2014 at 11:06 am

Viewing 1 reply thread


Tammy Perlman

October 8, 2014 at 11:06 am

EE4 new install. So many questions today! Need to add one line of text at the bottom of the Payment Options page. Help?


Josh

  • Support Staff

October 8, 2014 at 2:38 pm

Hi Tammy,

Are you familiar with how to use WordPress action hooks? If not, here’s an introduction I recommend reading:

http://www.nathanrice.net/blog/an-introduction-to-wordpress-action-hooks/

The template file that makes the Payments Options page is named registration_page_payment_options.template.php. Inside it has two do_actions at the bottom of the page, one before and one after the next step button. This is the one before the button:

<?php do_action( 'AHEE__before_spco_whats_next_buttons', 'payment_options', $next_step ); ?>

This is a neat hook because it lets you do something unique depending on which step it’s on. So to add a line of text at the bottom of the Payment Options page, you add something like this to your custom snippets plugin or your theme’s functions.php file.

add_action( 'AHEE__before_spco_whats_next_buttons', 'my_custom_text_on_payment_options_page', 10, 2 );

function my_custom_text_on_payment_options_page( $current_step, $next_step ) {
	if ( $current_step == 'payment_options' ) {
		echo '

This is my custom message

'; } }
Viewing 1 reply thread

The support post ‘Add text to Payment Options 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