Skip to content

Commit

Permalink
Deprecate guess work in processPriceSet
Browse files Browse the repository at this point in the history
Testing to see how much of this we can deprecate - line items should
be 'complete' before reaching the processing function
  • Loading branch information
eileenmcnaughton committed Jun 28, 2021
1 parent 175c023 commit 4ec7a83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CRM/Price/BAO/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ public static function processPriceSet($entityId, $lineItems, $contributionDetai
$line['entity_id'] = $entityId;
}
if (!empty($line['membership_type_id'])) {
if (($line['entity_table'] ?? '') !== 'civicrm_membership') {
CRM_Core_Error::deprecatedWarning('entity table should be already set');
}
$line['entity_table'] = 'civicrm_membership';
}
if (!empty($contributionDetails->id)) {
Expand Down

0 comments on commit 4ec7a83

Please sign in to comment.