Support

Home Forums Event Espresso Premium Change receipt link to invoice link

Change receipt link to invoice link

Posted: January 29, 2016 at 4:34 am


Auric

January 29, 2016 at 4:34 am

I want to change the link on the thank you page from displaying the receipt to displaying the invoice by default? I think I need to change thank-you-page-overview.template.php as I can see the button text of ‘View Full Order Confirmation Receipt.’ I can also see that the parameter to change is $TXN_receipt_url, but as a guess I thought $TXN_invoice_url might work but can’t find any references to it. How do I change from displaying the receipt to displaying the invoiceby default?


Tony

  • Support Staff

January 29, 2016 at 6:13 am

Hi there,

There is no $TXN_invoice_url variable passed to the template, but you can create your own easily enough:

$TXN_invoice_url = $transaction->invoice_url( 'html');

Then swap out the check on $TXN_receipt_url for invoice:

if ( ! empty( $TXN_invoice_url ) )

You’ll want to completely remove this code:

<?php echo apply_filters( 'FHEE__thank_you_page_overview_template__order_conf_button_text', __( 'View Full Order Confirmation Receipt', 'event_espresso' )); ?>

and replace it with your own text for the button.

To note, we can not support modifying core files, if you modify this template within the /plugins/event-espresso-core-reg/ directory we can not provide support for EE as it has been modified. However we do provide a means for you to load a custom version of the template using your sites theme, if you copy the template to you themes root directory you can modify the template there and EE will use that instead of the original.


Auric

February 1, 2016 at 5:51 am

I’m not a developer so you’ll have to explain where I should add the line; $TXN_invoice_url = $transaction->invoice_url( ‘html’);
I get your message about a child theme; I insist on child themes for all our sites.


Tony

  • Support Staff

February 1, 2016 at 6:07 am

You need to load the invoice url before you use, so you add that line before checking if $TXN_invoice_url is empty, so something like this – http://take.ms/WJfyP

If you are unsure of the above I would recommend contacting a developer who can help with your modifications. Generally we can help point you in the right direction but you’ll need some knowledge of WP Templates, PHP etc 🙂


Auric

February 1, 2016 at 6:46 am

I understand what you’ve done in the image, thanks.


Tony

  • Support Staff

February 1, 2016 at 7:04 am

You’re most welcome, Auric.

The support post ‘Change receipt link to invoice link’ 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