Support

Home Forums Event Espresso Premium Code for customizing buttons is not working

Code for customizing buttons is not working

Posted: January 29, 2016 at 2:38 pm

Viewing 4 reply threads


sliceliterary

January 29, 2016 at 2:38 pm

Hi, I followed the instructions for customizing button text via our site specific plugin. I’d like to change to “Proceed to Payment Options” button to say “Go to Next Steps.” Below is the code I’ve added based on the instructions. The button text did not change. Am I doing something wrong? I followed the instructions in this article: https://eventespresso.com/wiki/customize-checkout-registration-button-text/

Thanks in advance!
M

function ee_proceed_to_button() {
return ‘Go to’;
}

add_filter (‘FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__proceed_to’, ‘ee_proceed_to_button’);

function ee_payment_options_button( $translated, $original, $domain ) {
$strings = array(
‘Payment%sOptions’ => ‘Next Steps’
);
if ( isset( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}

add_filter( ‘gettext’, ‘ee_payment_options_button’, 10, 3 );


Josh

  • Support Staff

January 29, 2016 at 3:39 pm

Hi there,
Can you do this instead?

function ee_proceed_to_button() {
 return 'Go to Payment Processing';
}
add_filter ('FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text', 'ee_proceed_to_button');


sliceliterary

January 29, 2016 at 6:08 pm

Would I add the code exactly the way you have it here? Nothing happened when I did that. Should I change or add something to it? Thank you for answering on the weekend!


Tony

  • Support Staff

February 1, 2016 at 9:07 am

Hi there it looks like you the text to be ‘Go to Next Steps’ right?

In that case you want:

function ee_proceed_to_button() {
 return 'Go to Next Steps';
}
add_filter ('FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text', 'ee_proceed_to_button');


sliceliterary

February 10, 2016 at 9:58 am

It worked–thank you!!

Viewing 4 reply threads

The support post ‘Code for customizing buttons is not working’ 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