Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
No Payment Required - EE4 | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium No Payment Required – EE4

No Payment Required – EE4

Posted: April 8, 2014 at 2:04 pm

Viewing 1 reply thread


Steve Duffy

April 8, 2014 at 2:04 pm

Hello,

WordPress: 3.8.2
EE: 4.2
New Install
http://wbcompanies.com

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”?


Lorenzo Orlando Caum

  • Support Staff

April 8, 2014 at 4:30 pm

Hi Steve,

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

Please add it to a custom functions plugin and then upload that plugin to your WordPress plugins folder. You’ll then be able to activate it through WordPress plugins: http://ottopress.com/2011/creating-a-site-specific-snippets-plugin/


Lorenzo


Lorenzo Orlando Caum

  • Support Staff

April 8, 2014 at 7:03 pm

Sample code updated:

https://staging.eventespresso.com/topic/no-payment-required-ee4/#post-91055


Lorenzo

Viewing 1 reply thread

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.

Event Espresso - Staging Server