create membership for the organisation rather than for the individual

This commit is contained in:
Marc Michalsky 2024-05-06 15:08:05 +02:00
parent 68697570d0
commit d66c4934a6
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9

View file

@ -817,7 +817,7 @@ function civicrm_api3_twingle_donation_Submit($params) {
// CREATE the membership if required
if (isset($membership_type_id)) {
$membership_data = [
'contact_id' => $contact_id,
'contact_id' => $organisation_id ?? $contact_id,
'membership_type_id' => $membership_type_id,
];
// set campaign, subject to configuration