use api4 instead of api3

This commit is contained in:
Marc Michalsky 2024-06-06 12:29:17 +02:00
parent 1ddcc217e3
commit 089bbdf934
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9

View file

@ -492,10 +492,12 @@ function civicrm_api3_twingle_donation_Submit($params) {
&& '' != $params[$target]
&& in_array($target, $contact_note_mappings)
) {
civicrm_api3('Note', 'create', [
civicrm_api4('Note', 'create', [
'values' => [
'entity_table' => 'civicrm_contact',
'entity_id' => $contact_id,
'note' => $params[$target],
],
]);
}
}
@ -812,10 +814,12 @@ function civicrm_api3_twingle_donation_Submit($params) {
&& isset($params[$target])
&& '' != $params[$target]
) {
civicrm_api3('Note', 'create', [
civicrm_api4('Note', 'create', [
'values' => [
'entity_table' => 'civicrm_contribution',
'entity_id' => $result_values['contribution']['id'],
'note' => $params[$target],
],
]);
}
}