Home Forums Event Espresso Premium Promo Code. Declined Message.

Promo Code. Declined Message.

Posted: October 12, 2015 at 12:26 pm

KIROS -Penny

October 12, 2015 at 12:26 pm

Does Declined Message in Promo code appear if you enter incorrect promo code or if number of uses has expired or timeframe has expired or any of the above? Thank you!

Using EE4.8.14.p, WordPress 4.3.1.

Lorenzo Orlando Caum

  • Support Staff

October 12, 2015 at 12:48 pm

Hello, here is an example of where that messaging is used.

Lets say you have one promotion that is exclusive. This means that it once it has been applied then additional promotions can’t be applied.

If a registrant/attendee uses it and then tries to use another discount code to get an additional discount, then they will see the declined message within the yellow popup message.


KIROS -Penny

October 13, 2015 at 11:59 am

If the maximum uses are already used, is there a way to enter a message such as “All promotion codes have been used for this event.” ?

And to have a different message for other issues (incorrect code, timeframe has expired, attempts to use exclusive codes, etc? Thank you!

Lorenzo Orlando Caum

  • Support Staff

October 13, 2015 at 12:09 pm

Hello, any available options are already shown in the settings area for the promotions system. You won’t be able to add additional messaging when a specific condition occurs.


KIROS -Penny

October 16, 2015 at 1:13 pm

1. Under “Promotions”, where do the “Accepted Message” and “Decline Message” that I have typed in appear in registration process?

2. I did a test with an incorrect code. The message that appeared was different than I had typed. It looks automated: “We’re sorry, but the promotion code ” ” appears to be invalid. You are welcome to try a different promotion code or to try this one again….”

This is more along the lines of what I was looking for in original question. However, I’m wondering what the other automated resposes are, and where I can find them?

Lorenzo Orlando Caum

  • Support Staff

October 16, 2015 at 1:47 pm

Hello, the accepted message is shown when you submit a promo code and it is accepted.

I shared an earlier example of how the declined messaging is shown:

The other messaging that may be used could be changed through a gettext filter:

function ee_replace_promotions_messaging( $translated, $original, $domain ) {
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'We\'re sorry, but the %1$s "%2$s" appears to be invalid.%3$sYou are welcome to try a different %1$s or to try this one again to ensure it was entered correctly.' => 'Replace me with new messaging',
    // 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', 'ee_replace_promotions_messaging', 10, 3 );


  • This reply was modified 1 year, 4 months ago by  Josh. Reason: corrected string with escaping

The support post ‘Promo Code. Declined 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Lorenzo Orlando Caum 4 years, 3 months ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!