Support

Home Forums Event Espresso Premium Hide Receipt from users unless payment has been approved.

Hide Receipt from users unless payment has been approved.

Posted: February 5, 2020 at 11:12 pm

Viewing 1 reply thread


KBrownlee

February 5, 2020 at 11:12 pm

When an user registers for an event, and the payment method is set to Invoice, it would be ideal to not show them the receipt option as ‘receipt’ is something that should only be available if the payment has been made.

Understand that the ‘receipt’ indicates ‘ Pending Payment’ as status but the wording ‘Receipt’ itself seems confusing to our users.

How can we hide ‘Receipt’ from users unless the payment has been made?
https://prnt.sc/qy91ms

It’s fine to display the receipt once the payment has been made though like on the [ESPRESSO_MY_EVENTS] shortcode page for a logged in user.

Please let us know a workaround this.


Tony

  • Support Staff

February 6, 2020 at 7:46 am

Hi there,

Yes, its is possible, but you’ll need to load your own version of the template used on that page to do it.

If you are not using a child theme I recommend creating one, there is info on how to do so here:

https://developer.wordpress.org/themes/advanced-topics/child-themes/

Then, grab a copy of the thank you page template:

\event-espresso-core-reg\modules\thank_you_page\templates\thank-you-page-overview.template.php

Place the copy in the root directory of your child theme.

Edit that copy of the template and change this line:

if (! empty($TXN_receipt_url)) : ?>

To this:

if (! empty($TXN_receipt_url) && $transaction->status_ID() === EEM_Transaction::complete_status_code) : ?>

The button will now not load if the transaction has not been completed (no monies are owed).

Viewing 1 reply thread

The support post ‘Hide Receipt from users unless payment has been approved.’ 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