$this->single($input, [
'related_contact' => $ids['related_contact'] ?? NULL,
- 'participant' => !empty($objects['participant']) ? $objects['participant']->id : NULL,
- 'contributionRecur' => !empty($objects['contributionRecur']) ? $objects['contributionRecur']->id : NULL,
+ 'participant' => $ids['participant'] ?? NULL,
+ 'contributionRecur' => $recur->id,
], $objects['contribution'], TRUE);
}
$this->single($input, [
'related_contact' => $ids['related_contact'] ?? NULL,
'participant' => $ids['participant'] ?? NULL,
- 'contributionRecur' => !empty($objects['contributionRecur']) ? $objects['contributionRecur']->id : NULL,
+ 'contributionRecur' => $contributionRecurID,
], $objects['contribution']);
}
catch (CRM_Core_Exception $e) {