Support

Home Forums Event Espresso Premium "Proceed to Finalize Registration" button text doesn't change unless refresh

"Proceed to Finalize Registration" button text doesn't change unless refresh

Posted: March 1, 2017 at 10:48 am

Viewing 9 reply threads


mpseminars

March 1, 2017 at 10:48 am

Hello, I have code that changes the “Proceed to Finalize Registration” button text, but it doesn’t change on initial page load. But, if I refresh the page, then the button text changes.

The code I am using is found here:
https://eventespresso.com/topic/upgrade-to-v4-6-28-has-broken-my-change-to-proceed-to-payment-options-button/#post-158294

Thank you.


Josh

  • Support Staff

March 1, 2017 at 11:25 am

Hi there,

The code in that other thread is actually written to change the button text when you re-visit the page (like if register first, then pay later).

The documentation has the code that you can use to change the button text:

https://eventespresso.com/wiki/customize-checkout-registration-button-text/


mpseminars

March 1, 2017 at 11:54 am

Hi Josh, I used your code and it still does the same – only displays if I refresh the page.


Josh

  • Support Staff

March 1, 2017 at 11:59 am

May I ask which of the examples did you use?


mpseminars

March 1, 2017 at 12:21 pm

I am using these two functions:

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 );

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 = ‘Proceed to Checkout’;
}
return $submit_button_text;
}

add_filter ( ‘FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text’, ‘ee_proceed_to_button’, 10, 2 );


Josh

  • Support Staff

March 1, 2017 at 12:41 pm

Are you loading that code in via a plugin? It shouldn’t require a refresh unless something is serving an earlier version of the page or something is interfering.


mpseminars

March 1, 2017 at 2:46 pm

I’m loading it via my functions file. I’m using Dynamik Website Builder (a Genesis Theme)


Tony

  • Support Staff

March 1, 2017 at 4:33 pm

Can you link us to an event so we can view this please?


Josh

  • Support Staff

March 1, 2017 at 4:45 pm

The code may be loading too late from the themes functions.php file. The theme files load *after* the plugin files load.

You can add the code to a functions plugin and that will ensure it will load early enough.


mpseminars

March 2, 2017 at 9:29 pm

Thank you – putting the code in a site specific plugin fixed it.

Viewing 9 reply threads

The support post ‘"Proceed to Finalize Registration" button text doesn't change unless refresh’ 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