- // if contribution is not attached to the participant.
- if (empty($participantIds) && $lineItem->entity_table == 'civicrm_participant') {
- $participantIds[] = $lineItem->entity_id;
- }
- foreach ($participantIds as $key => $id) {
- if (!empty($id)) {
- CRM_Core_DAO::executeQuery("UPDATE `civicrm_participant` SET `fee_level` = REPLACE(fee_level, %1, %2) WHERE id = {$id}", $params);
- }
+ // Update participant
+ if ($lineItem->entity_table == 'civicrm_participant') {
+ CRM_Core_DAO::executeQuery("UPDATE `civicrm_participant` SET `fee_level` = REPLACE(fee_level, %1, %2) WHERE id = {$lineItem->entity_id}", $params);