Skip to content

Commit

Permalink
Merge pull request #15334 from mattwire/membership16_fixdupelineitems
Browse files Browse the repository at this point in the history
dev/membership/#16 Fix duplicate lineitems when creating a recurring membership via backend
  • Loading branch information
seamuslee001 authored Sep 23, 2019
2 parents 85d7568 + c80e665 commit 91f615b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Member/BAO/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ public static function create(&$params, &$ids = []) {

// This could happen if there is no contribution or we are in one of many
// weird and wonderful flows. This is scary code. Keep adding tests.
if (!empty($params['line_item']) && empty($ids['contribution'])) {
if (!empty($params['line_item']) && empty($ids['contribution']) && empty($params['contribution_id'])) {

foreach ($params['line_item'] as $priceSetId => $lineItems) {
foreach ($lineItems as $lineIndex => $lineItem) {
Expand Down

0 comments on commit 91f615b

Please sign in to comment.