false when an operator opted out via the // `yatra_send_manual_payment_emails` filter; the event still reaches // every other listener (automations, webhooks, …). if (isset($paymentData['send_emails']) && !$paymentData['send_emails']) { return; } if (!empty($paymentData)) { NotificationService::sendPaymentCompletedNotification($paymentData); } } /** * Handle booking status changed event */ public static function onBookingStatusChanged(int $bookingId, string $oldStatus, string $newStatus): void { // Send cancellation notification if status changed to cancelled if ($newStatus === 'cancelled') { $bookingRepository = new \Yatra\Repositories\BookingRepository(); $booking = $bookingRepository->find($bookingId); if ($booking) { NotificationService::sendCancellationNotification($bookingId, (array) $booking); } } } }