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 20, 2021
1 parent 93aadf0 commit 7f280da
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 7f280da

Please sign in to comment.