[#31] only create memberships on initial payments
This commit is contained in:
parent
4ec0fef825
commit
da790863b5
1 changed files with 4 additions and 5 deletions
|
@ -703,12 +703,11 @@ function civicrm_api3_twingle_donation_Submit($params) {
|
|||
if ($params['donation_rhythm'] != 'one_time') {
|
||||
$membership_type_id = $profile->getAttribute('membership_type_id_recur');
|
||||
}
|
||||
else {
|
||||
// only create memberships, if this isn't an installment
|
||||
if (empty($params['parent_trx_id'])) {
|
||||
elseif (empty($params['parent_trx_id'])) {
|
||||
// only create memberships, if this isn't an installment (e.g. parent_trx_id is set)
|
||||
$membership_type_id = $profile->getAttribute('membership_type_id');
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($membership_type_id)) {
|
||||
// create the membership
|
||||
$membership_data = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue