Support

Home Forums Event Espresso Premium Add custom field data to EE4 Invoice Description (ticket name)

Add custom field data to EE4 Invoice Description (ticket name)

Posted: December 23, 2015 at 3:26 pm


Mana Retreat

December 23, 2015 at 3:26 pm

Hi Support
Our events often have multiple ticket options. When a client registers, and is redirected to the payment gateway, the Invoice Description (ticket name) is transmitted. Unfortunately, this has no reference to the actual event, only the ticket name which can be the same as many other events.

We have a custom field which contains an internal/admin event reference number which we would like to prepend to the Invoice Description – (eg; 1119:1-2 Jan – Accommodation & Meals) to assist with the identification of payments.

See typical event here – event example.

How and where can I edit the Invoice Description to include this custom field?
Kind regards Stephen


Josh

  • Support Staff

December 23, 2015 at 3:51 pm

Hi Stephen,

We may need to add a filter hook to allow adding this. Can you let me know which gateway you’re using, and is there another name for the field or is it actually called an Invoice description?


Mana Retreat

December 23, 2015 at 4:04 pm

Hi Josh
Thank you for your reply.
We are using eWay via the Mijireh Gateway.
The Invoice Description that is sent to and displayed at eWay is the actual Ticket Name only.


Josh

  • Support Staff

December 23, 2015 at 4:39 pm

Hi Stephen,

I checked and this is a place where we’d need to add a filter hook to allow for adding/modifying the field before it’s sent to Mijireh. I can put in a request, and we can add a filter hook in a future update.


Mana Retreat

December 23, 2015 at 5:21 pm

Hi Josh
Thanks for that.
Any idea of the time frame to do this?


Josh

  • Support Staff

December 23, 2015 at 5:24 pm

Not at the moment, but I can tell you that a Github pull request will expedite this.


Josh

  • Support Staff

January 28, 2016 at 2:59 pm

Hi Stephen,

Update:
There were two new hooks added to the Mijireh gateway and they were included in Event Espresso 4.8.32.p, which was released today. The hooks are:

FHEE__EEG_Mijireh__set_redirection_info__full_amount_line_item_name
and
FHEE__EEG_Mijireh__set_redirection_info__partial_amount_line_item_name

we pass in the $primary_registrant object, so a filter function can return the event name with $primary_registrant->event_name(). Please let us know if you need help with putting together the filter function.


Devaraj

February 1, 2016 at 1:37 pm

This looks like what I have been needing for our Mijireh Gateway and EPDQ Barclays… would appreciate help to try it.. thanks!


Josh

  • Support Staff

February 2, 2016 at 4:36 pm

Hi there,

You can pass the event name for all tickets by adding the following code to your functions file:

add_filter( 'FHEE__EEG_Mijireh__set_redirection_info__full_amount_line_item_name', 'mijireh_send_event_name', 10, 4 );
function mijireh_send_event_name( $name, $lin, $payment, $primary_registrant ){
 $name = $primary_registrant->event_name();
 return $name;
}

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

The support post ‘Add custom field data to EE4 Invoice Description (ticket name)’ 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