This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line | |
add_action( 'tribe_community_event_save_updated', function ( $event_id ) { | |
if ( tribe_is_event( $event_id ) ) { | |
$url = home_url( '/sample-page/' ); | |
// JS redirect allows server processing to complete | |
echo '<script>window.location.href = "' . esc_url( $url ) . '";</script>'; | |
} | |
} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line | |
class ET_Event_Organizer_Notification_Manager { | |
public function __construct() { | |
// Action hooks for RSVP, WooCommerce, and Tickets Commerce | |
add_action( 'event_tickets_rsvp_tickets_generated', [ $this, 'handle_rsvp_attendee' ], 10, 2 ); | |
add_action( 'tec_tickets_commerce_flag_action_generated_attendees', [ $this, 'handle_commerce_attendee' ] ); | |
add_action( 'event_ticket_woo_attendee_created', [ $this, 'handle_woo_attendee' ], 10, 2 ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line | |
add_filter( 'tec_tickets_wallet_plus_pdf_pass_filename', function ( $filename, $attendee_id ) { | |
// Get attendee using the ID | |
$attendees = tribe_tickets_get_attendees( $attendee_id ); | |
// Early return if no attendees found | |
if ( empty( $attendees ) || ! is_array( $attendees ) ) { | |
return $filename; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line | |
class EventsListWidget_NewlyAddedEvents { | |
protected $constraints = array( | |
'sidebar_id' => null, | |
'widget_id' => null, | |
'widget_title' => null | |
); | |
public function __construct( array $constraints = array() ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line | |
add_filter( 'tec_tickets_emails_completed-order_placeholders', function ( $placeholders, $id, $email ) { | |
// Ensure the email object contains attendees | |
$attendees = $email->get( 'attendees' ); | |
if ( empty( $attendees ) || ! is_array( $attendees ) ) { | |
return $placeholders; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line | |
add_filter( 'tribe_events_rewrite_base_slugs', static function ( array $bases ): array { | |
$bases['archive'] = []; | |
return $bases; | |
} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line | |
add_filter( 'tribe_tickets_get_default_module', function ( $default, $modules ) { | |
$woocommerce_module = 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main'; | |
// WooCommerce available and not default | |
if ( in_array( $woocommerce_module, $modules ) && $default !== $woocommerce_module ) { | |
return $woocommerce_module; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line | |
add_filter( 'tribe_events_tickets_attendees_table_column', function ( $value, $item, $column ) { | |
if ( $column !== 'associated_event' ) { | |
return $value; | |
} | |
if ( ! empty( $item['event_id'] ) ) { | |
$event = tribe_get_event( $item['event_id'] ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line | |
add_filter( 'tribe_tickets_user_can_manage_attendees', function ( $user_can, $user_id ) { | |
$allowed_user_ids = [ 1 ]; // List of user IDs allowed to manage attendees | |
if ( in_array( $user_id, $allowed_user_ids, true ) ) { | |
$user_can = true; | |
} | |
return $user_can; |
NewerOlder