Tribe__Tickets_Plus__Commerce__EDD__Main::allow_resending_email( WP_Post|null $ticket = null, array|null $attendee = null )

Handles if email sending is allowed.


Parameters

$ticket

(WP_Post|null) (Optional) The ticket post object if available, otherwise null.

Default value: null

$attendee

(array|null) (Optional) The attendee information if available, otherwise null.

Default value: null


Top ↑

Return

(boolean)


Top ↑

Source

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

	public function allow_resending_email( $ticket = null, $attendee = null ) {
		// Check for cancelled or refunded orders. Cancelled orders for EDD are false.
		$allow_email_resend = ! ( empty( $attendee['order_status'] ) || 'Refunded' === $attendee['order_status'] );

		/**
		 *
		 * Shared filter between Woo, EDD, and the default logic.
		 * This filter allows the admin to control the re-send email option when an attendee's email is updated per a payment type (EDD, Woo, etc).
		 * True means allow email resend, false means disallow email resend.
		 *
		 * @since 5.3.1
		 *
		 * @param bool         						  Whether to allow email resending.
		 * @param WP_Post|null $ticket                The ticket post object if available, otherwise null.
		 * @param array|null   $attendee              The attendee information if available, otherwise null.
		 */
		return (bool) apply_filters( 'tribe_tickets_manual_attendee_allow_email_resend', $allow_email_resend, $ticket, $attendee );

	}

Top ↑

Changelog

Changelog
Version Description
5.3.1 Introduced.