Tribe__Tickets__Commerce__PayPal__Main::maybe_send_tickets_after_status_change( $event_id )

Triggers the sending of ticket emails after PayPal Ticket information is updated.

This is useful if a user initially suggests they will not be attending an event (in which case we do not send tickets out) but where they incrementally amend the status of one or more of those tickets to attending, at which point we should send tickets out for any of those newly attending persons.


Parameters

$event_id

(Required)


Top ↑

Source

File: src/Tribe/Commerce/PayPal/Main.php

	public function maybe_send_tickets_after_status_change( $event_id ) {
		$transaction_ids = array();

		foreach ( $this->get_event_attendees( $event_id ) as $attendee ) {
			$transaction = get_post_meta( $attendee[ 'attendee_id' ], $this->order_key, true );

			if ( ! empty( $transaction ) ) {
				$transaction_ids[ $transaction ] = $transaction;
			}
		}

		foreach ( $transaction_ids as $transaction ) {
			// This method takes care of intelligently sending out emails only when
			// required, for attendees that have not yet received their tickets
			$this->send_tickets_email( $transaction, $event_id );
		}
	}

Top ↑

Changelog

Changelog
Version Description
4.7 Introduced.