Skip to content

Instantly share code, notes, and snippets.

@joshfeck
joshfeck / ee_display_download_tickets.php
Last active June 20, 2018 15:15 — forked from Pebblo/ee_display_download_tickets.php
Add a 'Download your tickets' button & the QR code to the EE4 thank you page. The hook in use adds the button & QR code before the overview, just after the confirmation order section. You will likely need to apply your own styles, possibly a container div and apply styles to that depending on how you want this to be displayed.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_display_download_tickets( $transaction ) {
if ( $transaction instanceof EE_Transaction ) {
$primary_reg = $transaction->primary_registration();
if ( $primary_reg->is_approved() ) {
@joshfeck
joshfeck / example.php
Last active August 3, 2018 22:52 — forked from Pebblo/example-multiple-caps.php
Example of how to dynamically remove the current registrations ticket capability (if set) from the current user.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action(
'AHEE__EE_Registration_Processor__trigger_registration_update_notifications',
'my_remove_one_time_invitation_from_user',
10,
2
);
function my_remove_one_time_invitation_from_user(
$registration,
<?php
// Options
$date_format = get_option( 'date_format' );
$time_format = get_option( 'time_format' );
// Load Venue View Helper
EE_Registry::instance()->load_helper('Venue_View');
//Defaults
$reg_button_text = !isset($reg_button_text) ? __('Register', 'event_espresso') : $reg_button_text;
$alt_button_text = !isset($alt_button_text) ? __('View Details', 'event_espresso') : $alt_button_text;//For alternate registration pages
$sold_out_button_text = !isset($sold_out_button_text) ? __('Sold Out', 'event_espresso') : $sold_out_button_text;//For sold out events