Remove handling from previously shared code
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 28 Nov 2023 12:30:46 +0000 (01:30 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 29 Nov 2023 12:30:37 +0000 (01:30 +1300)
CRM/Event/Form/Participant.php

index d5c7502ef8b65d4c8ac289653554aad82a513113..fe384b1d26fc442e6737a306a86fb2986484c92d 100644 (file)
@@ -1602,19 +1602,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
       'note' => $this->getSubmittedValue('note'),
       'is_test' => ($this->_mode === 'test)'),
     ];
-
-    // reuse id if one already exists for this one (can happen
-    // with back button being hit etc)
-    if (!$participantParams['id'] && !empty($params['contributionID'])) {
-      $pID = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment',
-        $params['contributionID'],
-        'participant_id',
-        'contribution_id'
-      );
-      $participantParams['id'] = $pID;
-    }
     $participantParams['discount_id'] = $this->getSubmittedValue('discount_id');
-
     $participant = CRM_Event_BAO_Participant::create($participantParams);
 
     // Add custom data for participant