Support

Home Forums Event Espresso Premium Multiple payment attempts generate multiple lines on invoice

Multiple payment attempts generate multiple lines on invoice

Posted: December 29, 2016 at 2:02 am


bmachuel

December 29, 2016 at 2:02 am

Hi there,

Each payment attempt generates a “pending payment” line at the bottom of the invoice. Is there a way to list only the latest payment attempt instead? That would save space on the invoice and avoid confusion on the customer’s side.

Thanks in advance.

Best regards,

Benoît
———


Tony

  • Support Staff

December 29, 2016 at 3:59 am

Hi Benoît,

Whilst it would be possible with some custom development it is not something that EE currently has available.

The payment_list shortcode loops over all of the payments within the invoice outputting each payment within the transaction. To list only the last payment would require a custom shortcode for the messages system that pulled the last payment method and output the details (without looping over any of the others).


bmachuel

December 29, 2016 at 7:35 am

Thanks.

Another option could be to display the payment on the invoice once it has been successfully processed and ignore unsuccessful attempts. Information-wise, that would be much more relevant to the consumer.


Tony

  • Support Staff

December 29, 2016 at 8:47 am

Would users not find failed payment attempts relevant?

I checked into the code for the payment list and it looks like it was originally intended to only display approved payments but has since been changed. I’ll check with our developers as to why.

In any case I double checked the code for parsing the payment list and it turns out there is a filter available that can be used on the payments which allows you to return only approved payments.

You can use something like this: https://gist.github.com/Pebblo/ef9052c371e61ec11cdb1202c2c6d280

However you will need to place that function within a Custom Functions Plugin for it to work.


bmachuel

December 29, 2016 at 8:49 pm

Thanks Tony,

I will try that and come back to you.

Best regards,

Benoît


bmachuel

January 5, 2017 at 8:57 am

Dear Tony,

I followed your advice and added the custom plugin. It does exactly what I was looking for, thanks a lot.

Best regards

Benoît

The support post ‘Multiple payment attempts generate multiple lines on invoice’ 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  bmachuel 3 years, 3 months ago ago

Topic Tags

Notifications

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