From 1f359b9bd82d6a895c9885b738de17574474e2ef Mon Sep 17 00:00:00 2001 From: colemanw Date: Sat, 8 Aug 2026 15:46:35 -0400 Subject: [PATCH] Migrate updateParticipantStatus() to use APIv4 --- CRM/Event/BAO/Participant.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index 9f8f8c5a9bb1..80066bcac55e 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -1282,11 +1282,10 @@ public static function updateParticipantStatus($participantID, $oldStatusID, $ne if (!empty($cascadeAdditionalIds)) { try { foreach ($cascadeAdditionalIds as $id) { - $participantParams = [ - 'id' => $id, - 'status_id' => $newStatusID, - ]; - civicrm_api3('Participant', 'create', $participantParams); + \Civi\Api4\Participant::update(FALSE) + ->addValue('status_id', $newStatusID) + ->addWhere('id', '=', $id) + ->execute(); } return TRUE; }