diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index f07e2597b694..f5849d307675 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -524,6 +524,12 @@ public function postProcess() { $value['email'] = CRM_Utils_Array::valueByRegexKey('/^email-/', $value); } + // If registering from waitlist participant_id is set but contact_id is not. + // We need a contact ID to process the payment so set the "primary" contact ID. + if (empty($value['contact_id'])) { + $value['contact_id'] = $contactID; + } + if (is_object($payment)) { // Not quite sure why we don't just user $value since it contains the data // from result