Home Forums Event Espresso Premium Promotional Coupon wrong description on checkout

Promotional Coupon wrong description on checkout

Posted: May 11, 2017 at 5:45 pm


May 11, 2017 at 5:45 pm

We have some issue with promotional coupon description that being displayed during checkout.
The discount itself is working right, but showing wrong event in the description. Here is what I meant.
“Woodworking Junior Camp” was past event.
promotion code

We did duplicate events from past events and changed the description/title. Is it an issue?
How can we fix this? because this confuses our customers.



  • Support Staff

May 12, 2017 at 3:54 am

Hi there,

It looks like the output for the promo code line items has been edited as it’s different from the default.

I would first check what the ‘Name’ of the promotion code is currently set to.

Go to: Event Espresso -> Promotions.

Find the code you are using on that event and check the name, what is it currently set to?


May 12, 2017 at 4:42 am

Hi, thanks for your quick response.

It says “Sample Sale Code Take 10” , which is correct
promotion name

But the event info was wrong. It shows past event.


  • Support Staff

May 12, 2017 at 5:29 am

Can you link me to the event you are testing this on please?

Usually, something like this would be caused by caching, are you running any caching plugins?

The output for the promotion Line item has been altered, by default it should look like this :-

Did you have a developer make changes to EE? If so how did they change the above?


May 12, 2017 at 7:45 am

Here is the event link:

We did make some modification, but only to the template file, EE core was not modified at all.
Can you tell me where does the file that output the promotion line item? I will try to check. We don’t mind if the promotion output like the default.



May 12, 2017 at 7:48 am

No we don’t use cache plugin, I removed it about 6 months ago.
We’re hosted on Siteground.


  • Support Staff

May 12, 2017 at 1:08 pm

Hi there,

All of the line items that get displayed there (prices and discounts) actually share the same code, so I suspect whatever the developer changed whether it be a change to a template or using a filter hook like
Something like a change like that would cause the other name to appear there. So the name of the file that has that customization on your site could be named anything really. I’d recommend temporarily removing that customization to see if that fixes the issue for you.

  • This reply was modified 3 years, 5 months ago by  Josh. Reason: FTFY


  • Support Staff

May 12, 2017 at 2:49 pm

As Josh mentioned it’s not really possible for us to say how the modifications were made, we can make some educated guesses but it depends on how the developer chose to change the output.

Check for translations on 'Discount: %1$s', this could be done through a plugin, function in functions.php or the PO/MO files.

Any code that’s hooking into FHEE__EE_SPCO_Line_Item_Display_Strategy__item_row__name or FHEE__EE_SPCO_Line_Item_Display_Strategy__item_row__desc.

Another thing to check is to create a NEW promo code (call it TEST PROMO for example) and test that on the event, what output does that show? Is it the promo name with the same date?


May 12, 2017 at 3:46 pm

We had this in EE functions file – to add the event’s detail date/time.
If I remove it, it turns back to default.

function ee_revise_registration_checkout_line_item_desc(  $original_description, $line_item, $options ) {
  $datetime_names = array();
  if( $line_item->ticket() instanceof EE_Ticket ) {
    foreach( $line_item->ticket()->datetimes() as $datetime ) {
      $datetime_names[] = $datetime->get_dtt_display_name(true);
  return sprintf( __( ' for "%1$s", <br />Date/time: %2$s', 'event_espresso' ),
    implode(", ", $datetime_names ) );

add_filter ('FHEE__EE_SPCO_Line_Item_Display_Strategy__item_row__desc', 'ee_revise_registration_checkout_line_item_desc', 10, 3);

Is there any way to display the event date/time for the event but not on the discount?



  • Support Staff

May 15, 2017 at 3:34 am

Sure there is, you check the current line item object type to see if it’s a promotion using something like this:

$line_item->OBJ_type() === 'Promotion'

So in your conditional, you could have:

if( $line_item->ticket() instanceof EE_Ticket && $line_item->OBJ_type() !== 'Promotion' )

However, you’ll also need to change that function so that it only returns the modified string if it’s inside the above conditional, otherwise, return $original_description.

Right now if you managed to find a line item that wasn’t assigned to a ticket (there isn’t one currently but we could add them in the future) your function will break the descriptions as it doesn’t return the original description even if the function is not doing anything.

The support post ‘Promotional Coupon wrong description on checkout’ 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  Tony 3 years, 5 months ago ago

Topic Tags



This topic is: not resolved
Do NOT follow this link or you will be banned from the site!
[gravityform id=80 title=false description=false ajax=false]
<div class='gf_browser_unknown gform_wrapper' id='gform_wrapper_80' ><form method='post' enctype='multipart/form-data' id='gform_80' action='/topic/promotional-coupon-wrong-description-on-checkout/'> <div class='gform_body'><ul id='gform_fields_80' class='gform_fields top_label form_sublabel_below description_below'><li id='field_80_1' class='gfield gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_80_1' >First name<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_text'><input name='input_1' id='input_80_1' type='text' value='' class='medium' aria-required="true" aria-invalid="false" /></div></li><li id='field_80_2' class='gfield gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_80_2' >Email address<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_email'> <input name='input_2' id='input_80_2' type='email' value='' class='medium' aria-required="true" aria-invalid="false" /> </div></li><li id='field_80_3' class='gfield gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' >GDPR Agreement<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_checkbox'><ul class='gfield_checkbox' id='input_80_3'><li class='gchoice_80_3_1'> <input name='input_3.1' type='checkbox' value='I consent to have this website store my submitted information so they can respond to my inquiry.' id='choice_80_3_1' /> <label for='choice_80_3_1' id='label_80_3_1'>I consent to have this website store my submitted information so they can respond to my inquiry.</label> </li></ul></div></li><li id='field_80_4' class='gfield gform_validation_container field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_80_4' >Comments</label><div class='ginput_container'><input name='input_4' id='input_80_4' type='text' value='' autocomplete='off'/></div><div class='gfield_description' id='gfield_description_80_4'>This field is for validation purposes and should be left unchanged.</div></li> </ul></div> <div class='gform_footer top_label'> <input type='submit' id='gform_submit_button_80' class='gform_button button' value='Download Now' onclick='if(window["gf_submitting_80"]){return false;} if( !jQuery("#gform_80")[0].checkValidity || jQuery("#gform_80")[0].checkValidity()){window["gf_submitting_80"]=true;} ' onkeypress='if( event.keyCode == 13 ){ if(window["gf_submitting_80"]){return false;} if( !jQuery("#gform_80")[0].checkValidity || jQuery("#gform_80")[0].checkValidity()){window["gf_submitting_80"]=true;} jQuery("#gform_80").trigger("submit",[true]); }' /> <input type='hidden' class='gform_hidden' name='is_submit_80' value='1' /> <input type='hidden' class='gform_hidden' name='gform_submit' value='80' /> <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' /> <input type='hidden' class='gform_hidden' name='state_80' value='WyJbXSIsIjBiNjdjZjkyMDUzOWUxOWY5Y2NiZjIwMzM4YjA1Mjk4Il0=' /> <input type='hidden' class='gform_hidden' name='gform_target_page_number_80' id='gform_target_page_number_80' value='0' /> <input type='hidden' class='gform_hidden' name='gform_source_page_number_80' id='gform_source_page_number_80' value='1' /> <input type='hidden' name='gform_field_values' value='' /> </div> </form> </div><script type='text/javascript'> jQuery(document).bind('gform_post_render', function(event, formId, currentPage){if(formId == 80) {} } );jQuery(document).bind('gform_post_conditional_logic', function(event, formId, fields, isInit){} );</script><script type='text/javascript'> jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [80, 1]) } ); </script>