Newest Version Email Snippet
-
We need to get email notifications configured for RSVPs so admins know when there is an RSVP. We are using:
Wordpress 4.9.7
Events Calendar 4.6.20.1
Events Tickets (free) 4.7.5.1I found various snippets on the official website but they don’t seem to work with the latest version. I don’t care about them being sent to attendees or the admin email, I am fine just specifying in the code for all I care.
This is what I have in the site now and it does not work. I receive my confirmation as the user, but no admin notification that the registration was made.
/* * The Events Calendar snippet * Send an email to organizer when new tickets are generate for en event they are running * Gist: https://gist.github.com/niconerd/16770b84adb6156aaa77948bf208bacb */ add_action( 'event_tickets_rsvp_tickets_generated', 'tribe_tickets_cc_organizer', 10, 3 ); function tribe_tickets_cc_organizer( $order_id = null, $post_id = null, $attendee_order_status = null ) { $to = '[email protected]'; // bail if there's no valid email for the organizer if ( ! is_email( $to ) ) return; $event_name = get_the_title( $post_id ); $site_name = get_bloginfo( 'name' ); $attendee_list_url = admin_url( 'edit.php?post_type=tribe_events&page=tickets-attendees&event_id=' . $post_id ); $content = '<a href="' . esc_url( $attendee_list_url ) . '" style="color: #000; font-family: sans-serif;">Check the event attendee list</a>'; $headers = array( 'Content-type: text/html' ); $subject = sprintf( __( 'Your event %1$s has new attendee(s) - %2$s', 'tribe-extension' ), $event_name, $site_name ); wp_mail( $to, $subject, $content, $headers); } add_action( 'event_ticket_woo_attendee_created', 'tribe_woo_compat_cc', 10, 4 ); function tribe_woo_compat_cc ( $attendee_id, $event_id, $order, $product_id ) { tribe_tickets_cc_organizer( null, $event_id ); }Can anyone assist with this?
The page I need help with: [log in to see the link]
The topic ‘Newest Version Email Snippet’ is closed to new replies.