Skip to content

Commit

Permalink
Fix membership/issues#16 Duplicate lineitems when creating a recurrin…
Browse files Browse the repository at this point in the history
…g membership via backend
  • Loading branch information
mattwire committed Sep 20, 2019
1 parent e7e4788 commit c80e665
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 c80e665

Please sign in to comment.