Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This thank you template file removes the 'Congratulations' text and Receipt button from the thank you page if you have ANY 'Not Approved' registrations within the group.
<?php
/** @var EE_Transaction $transaction */
/** @var boolean $revisit */
/** @var string $order_conf_desc */
do_action('AHEE__thank_you_page_overview_template__top', $transaction);
$where = array(
'TXN_ID' => $transaction->ID(),
'STS_ID' => EEM_Registration::status_id_not_approved
);
$not_approved_registrations = EEM_Registration::instance()->count(array($where));
?>
<div id="espresso-thank-you-page-overview-dv" class="width-100">
<?php if (! $revisit && $not_approved_registrations == 0) : ?>
<div class="ee-attention">
<div class="extra-padding-sides">
<?php echo apply_filters(
'FHEE__thank_you_page_overview_template__order_conf_desc',
sprintf(
$order_conf_desc,
'<h3 class="">',
'</h3>',
'<br />'
)
);
if (! empty($TXN_receipt_url)) : ?>
<br/>
<div class="jst-rght">
<a class="ee-button ee-roundish indented-text big-text"
href="<?php echo $TXN_receipt_url; ?>"><span
class="ee-icon ee-icon-PDF-file-type"></span>
<?php echo apply_filters(
'FHEE__thank_you_page_overview_template__order_conf_button_text',
__('View Full Order Confirmation Receipt', 'event_espresso')
); ?></a>
</div>
<?php endif; ?>
</div>
</div>
<br/>
<?php endif; ?>
<br/>
<?php do_action('AHEE__thank_you_page_overview_template__content', $transaction); ?>
</div>
<!-- end of espresso-thank-you-page-overview-dv -->
<?php do_action('AHEE__thank_you_page_overview_template__bottom', $transaction); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.