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
Question on successful coupon code message | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Question on successful coupon code message

Question on successful coupon code message

Posted: November 18, 2013 at 3:27 pm

Viewing 2 reply threads


Yolande Grill

November 18, 2013 at 3:27 pm

I used the code that Sidney has linked to ( https://gist.github.com/sethshoultes/5650757 ) to update the text that shows when someone successfully enters a coupon code in their cart. By default it is: *coupon code and price* ‘has being successfully applied to the following events:’

My last question is: how do I get rid of the colon at the end? Because I am using an add to cart button in a modified espresso_table.php, the event it was applied to doesn’t get shown. So, I just want it to say the coupon code ‘has been successfully applied’, with no colon at the end. That way people don’t get thrown off, because they’ll expect to see the event name after the colon which mine won’t display.

I tried using sidney’s code to find and replace the string ‘has being successfully applied to the following events:’ and it didn’t work until I ditched the colon, so it must be inserted somewhere else in the code?

Thanks again!


Anonymous

November 19, 2013 at 12:57 am

Hi Yolande,

The colon is added in event-espresso/includes/admin-files/coupon-management/use_coupon_code.php line 141.

$msg .= __('has been successfully applied to the following events', 'event_espresso') . ':<br/>';

Change it to:

$msg .= __('has been successfully applied to the following events', 'event_espresso') . '<br/>';

As the function that string is created within is pluggable the ‘update safe’ method is to use the Custom Files Add-on, copy the whole function (lines 28-177) and paste it into the custom_functions.php file, then modify it there.

However, I can tell you that Event Espresso 3.1.36 has had some modifications to that file/function. So you will need to repeat the above for the new version of EE, replacing the function with the new one then modifying your string again.

Edit* The code editor is removing the br tag at the end of that string, you will likely want to keep that in.


Yolande Grill

November 19, 2013 at 12:10 pm

Thank you Tony! I took the colon out on that file, I will get get the code moved over into the custom functions file after the update is released.


Anonymous

November 19, 2013 at 12:58 pm

No Problem :)

Viewing 2 reply threads

The support post ‘Question on successful coupon code message’ 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