Support

Home Forums Event Espresso Premium Invoices Should Be Marked As Paid

Invoices Should Be Marked As Paid

Posted: September 11, 2018 at 7:33 am

Viewing 4 reply threads


Phil Evans

September 11, 2018 at 7:33 am

Hi,

We’re in the process of testing EE with PayPal Express using PP Sandbox accounts.

When a transaction completes, the invoice shows the message

Please send this invoice with payment attached to the address above, or use the payment link below. Payment must be received within 48 hours of event date.

Invoice Should Be Marked As Paid

This should be marked as paid once payment is made via PayPal.

How can we change that?

Thanks

Phil


Tony

  • Support Staff

September 11, 2018 at 8:11 am

Hi Phil,

Currently, that text is pulled directly from the Invoice payment method instructions:

Event Espresso -> Payment methods -> Invoice -> Instructions

There is no check on the transaction status when displaying the text so it can not change to show something different based on the status, for that you would need your own custom shortcode that does pretty much the same steps as the current shortcode but also pulls in the transaction object and checks it’s status.


Phil Evans

September 11, 2018 at 8:13 am

Hi Tony,

Thanks. What’s the current shortcode? Where can we see the existing code to try to write a new one?

Thanks

Phil


Tony

  • Support Staff

September 11, 2018 at 8:21 am

What’s the current shortcode?

[INVOICE_PAYMENT_INSTRUCTIONS] is the current shortcode

You can see that in Event Espresso -> Messages -> Default messages templates -> Invoice

Where can we see the existing code to try to write a new one?

See here: https://github.com/eventespresso/event-espresso-core/blob/master/core/libraries/shortcodes/EE_Transaction_Shortcodes.lib.php#L661-L666

Note, please do not edit EE’s own core files, you can add your own shortcodes via hooks, editing any of EE’s file prevents us from providing support and will be lost each time EE updates (same as any other WP plugin).

I’ve previously posted examples of how to add your own message shortcodes here:

https://gist.github.com/Pebblo/dc011b43b461064a831d

The library your checking for would be EE_Transaction_Shortcodes

Here’s an example of how to add a shortcode specifically to the EE_Transaction_Shortcodes library which also shows you how you can get the EE_Transaction object:

https://gist.github.com/Pebblo/dc011b43b461064a831d


Phil Evans

September 11, 2018 at 8:22 am

Thanks Tony. Will have a read through all that later today.

Thanks

Phil

Viewing 4 reply threads

The support post ‘Invoices Should Be Marked As Paid’ 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