@@ -491,15 +491,17 @@ public function sendRevocationTicketEmail(SummitAttendeeTicket $ticket)
491491 * @param bool $overrideTicketOwnerIsSameAsOrderOwnerRule
492492 * @param array $payload
493493 * @param string|null $test_email_recipient
494+ * @param bool $use_delay
494495 * @return void
495- * @throws \Exception
496+ * @throws ValidationException
496497 */
497498 public function sendInvitationEmail
498499 (
499500 SummitAttendeeTicket $ ticket ,
500501 bool $ overrideTicketOwnerIsSameAsOrderOwnerRule = false ,
501502 array $ payload = [],
502- ?string $ test_email_recipient = null
503+ ?string $ test_email_recipient = null ,
504+ bool $ use_delay = true
503505 ):void
504506 {
505507
@@ -539,6 +541,7 @@ public function sendInvitationEmail
539541 // they bought a ticket for themselves.
540542 if ($ order ->getOwnerEmail () !== $ ticket ->getOwnerEmail () || $ overrideTicketOwnerIsSameAsOrderOwnerRule ) {
541543 $ delay = intval (Config::get ("registration.attendee_invitation_email_delay " , 10 ));
544+ if (!$ use_delay ) $ delay = 0 ;
542545 Log::debug
543546 (
544547 sprintf
@@ -555,6 +558,25 @@ public function sendInvitationEmail
555558 }
556559 }
557560
561+ /**
562+ * @param SummitAttendeeTicket $ticket
563+ * @return void
564+ * @throws ValidationException
565+ */
566+ public function sendInvitationEmailWithoutDelay
567+ (
568+ SummitAttendeeTicket $ ticket
569+ ):void {
570+ $ this ->sendInvitationEmail
571+ (
572+ $ ticket ,
573+ false ,
574+ [],
575+ null ,
576+ false
577+ );
578+ }
579+
558580 /**
559581 * @return bool
560582 */
0 commit comments