Support

Home Forums Event Espresso Premium Can I change the word "discount" when a certain promo code is used?

Can I change the word "discount" when a certain promo code is used?

Posted: July 26, 2016 at 11:43 am


MoDiva

July 26, 2016 at 11:43 am

Hi, I have two promo codes: one gives a 20% discount, the second is 0% discount but signifies a donation is being made (for every 0% discount entered, we will give a charity $2).

My question is this: can I change the word “Discount” on the registration-checkout page (the second registration-checkout page where the promo code that was entered appears after the ticket/qty/price line item and before the total line) ONLY when my 0% promo code is used? For example, when promo code one (20%) is used, the word “Discount” stays as is, but when promo code two (0%) is used I want it to say “Donation”

Thank you!


Lorenzo Orlando Caum

  • Support Staff

July 26, 2016 at 4:26 pm

Hello,

You can’t dynamically change the text that is shown on the page based on the type of discount. However, you can change the accepted message for a promotion through the promotions editor.

That is the messaging that appears in a green notice when a discount/promotion code has been successfully applied.


Lorenzo


MoDiva

July 27, 2016 at 10:50 am

OK, thank you for your prompt reply.

What’s the best way to permanently change that word without losing the change when the plugin is updated? I’m a fan of adding new functions to my child theme folder – will that work? If so, can you supply the exact code? Or do I need to make a copy of the php file and add it to my child theme folder? If I can only do the latter, what is the path/name of the file?

Thank you!


Josh

  • Support Staff

July 27, 2016 at 11:32 am

You can use the translation function that’s in our documentation to change this and other strings.

The exact string that you’ll put into the array of original strings is:

'Discount: %1$s'

Here’s a link to our documentation:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#custom-function

You can add the above to a functions plugin or into your WordPress child theme’s functions.php file.


MoDiva

July 27, 2016 at 11:42 am

Thank you.

The support post ‘Can I change the word "discount" when a certain promo code is used?’ 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