How to Customize the Checkout Registration Button Text

In this article, we’ll show you how to customize the text that is used for these buttons. Below we have examples of the buttons that you’ll see during registration checkout:

event-espresso-proceed-to-payment-options-button This button is used after entering registrant details and will take you to the payment options page
event-espresso-finalize-registration-button This button is used to finish up a registration and will take you to the thank you page
event-espresso-update-registration-details-button This button is used to update the registration details for an existing registration

 

These changes will be applied using WordPress filters. Its best to add the sample code snippets below to a site specific plugin. You can view our guide on creating a site specific plugin for WordPress.

Some Example code

Here’s some example code that’s intended to be instructional. If you’re familiar with the WordPress Plugin API you’ll note the use of the add_filters() function:

Specific, one-off examples

How to change the Proceed to Payment Options button text

The following code will change the only the text for the Proceed to Payment Options button:

function ee_proceed_to_button( $submit_button_text, EE_Checkout $checkout ) {
 if ( ! $checkout instanceof EE_Checkout || ! $checkout->current_step instanceof EE_SPCO_Reg_Step || ! $checkout->next_step instanceof EE_SPCO_Reg_Step ) {
  return $submit_button_text;
 } 
 if ( $checkout->next_step->slug() == 'payment_options' ) {
  $submit_button_text = 'Go to Payment Processing';
 }
 return $submit_button_text;
}

add_filter ( 'FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text', 'ee_proceed_to_button', 10, 2 );

To apply this function, you copy and paste the code into your site specific plugin. You can change “Go to Payment Processing” to something else and save your changes.

How to change the Finalize Registration button text

The following code will change only the text for the Finalize Registration button:

function ee_finalize_registration_button( $submit_button_text, EE_Checkout $checkout ) {
 if ( ! $checkout instanceof EE_Checkout || ! $checkout->current_step instanceof EE_SPCO_Reg_Step || ! $checkout->next_step instanceof EE_SPCO_Reg_Step ) {
  return $submit_button_text;
 }
 if ( $checkout->next_step->slug() == 'finalize_registration' ) {
  $submit_button_text = 'Complete My Registration';
 }
 return $submit_button_text;
}

add_filter ( 'FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text', 'ee_finalize_registration_button', 10, 2 );

The function for ee_finalize_registration_button will only change “Finalize Registration” to “Complete My Registration”.

To apply this function, you copy and paste it into your site specific plugin. Then change “Complete My Registration” to something else and save changes.

How to change the Update Attendee Information button text

The following code will change the text only for the Update Attendee Information button:

function ee_update_registration_details_button( $submit_button_text, EE_Checkout $checkout ) {
 if ( ! $checkout instanceof EE_Checkout || ! $checkout->current_step instanceof EE_SPCO_Reg_Step || ! $checkout->next_step instanceof EE_SPCO_Reg_Step ) {
  return $submit_button_text;
 } 
 if ( $checkout->current_step->slug() == 'attendee_information' && $checkout->revisit ) {
  $submit_button_text = 'Yes I Want To Change My Registration Details';
 }
 return $submit_button_text; 
}

add_filter ( 'FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text', 'ee_update_registration_details_button', 11, 2 );

The function for ee_update_registration_details_button will change only “Update Attendee Informations” to “Yes I Want To Change My Registration Details.”

To apply this function, you copy and paste it into your site specific plugin. Then change “Yes I Want To Change My Registration Details” to something else and save changes.

How to change the View Details and Register Now button text

The following buttons are not using during registration checkout but code snippets are included below should you need them.

event-espresso-view-details-button This button is used on the event list page
event-espresso-register-now-button This button is used on the single event pages

 

The following code will change the text for the View Details button:

function ee_view_details_button() {
 return 'Learn More About This Event';
}

add_filter ('FHEE__EE_Ticket_Selector__display_view_details_btn__btn_text', 'ee_view_details_button');

The above code will change “View Details” to “Learn More About This Event.”

To apply this function, you copy and paste it into your site specific plugin. Then change “Learn More About This Event” to something else and save changes.

The following code will change the text for the Register Now button:

function ee_register_now_button() {
 return 'Buy';
}

add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text', 'ee_register_now_button');

The above code will change “Register Now” to “Buy”.

To apply this function, you copy and paste it into your site specific plugin. Then change “Buy” to something else and save changes.


Need more help?

  • Browse or search for more information on this topic in our support forums. Customers with an active support license can open a support topic and get help from Event Espresso staff.
  • Have an emergency? Purchase a support token and get expedited one-on-one help!
  • Go back to documentation for Event Espresso
Event Espresso