My company does a large amount of free events and there aren’t plans to charge any time in the future. I’m wondering if it’s possible to change the “Proceed to Payment Options” button to say something else, such as “Complete Registration”?
The following lines of code will make that change for you:
function my_custom_ee_checkout_button() {
return 'Complete ';
}
add_filter('FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__proceed_to','my_custom_ee_checkout_button', 10, 3);
function mycustom_ee_filter_gettext( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'Payment%sOptions' => 'Registration'
// Add some more strings here
);
// See if the current string is in the $strings array
// If so, replace its translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'mycustom_ee_filter_gettext', 10, 3 );
The support post ‘No Payment Required – EE4’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.