In the meanwhile, have your got any further information about the other API function ?
Yes:
cred_notification_recipients is a filter to manage recipients while sending the Notification
the parameters are => $recipients, $notification, $form_id, $post_id
$recipients is the current recipients array to where notification will be sent and has a structure like this:
$recipients[] = array(
'address' => $address,
'to' => $to ['to','cc','bcc'],
'name' => $name,
'lastname => $lastname
);
$notification is the notification that will be sent
$form_id is the cred form that contains that notification
$post_id is the post id is going to be created/edited by the form
Here a real example
We created a notification, and when we submit the cred form we apply this filter:
add_filter('cred_notification_recipients', 'recipients_handler', 10, 4);
function recipients_handler($recipients, $notification, $form_id, $post_id) {
//i can add new recipient
$recipients[] = array('to' => 'to', 'address' => 'mynewemail@email.it', 'name' => '', 'lastname' => '');
return $recipients;
}
$to can be: 'to', 'cc', 'bcc'
$address is the email
$name *optional is name
$lastname * optional is lastname
If the input arrays have the same string keys, then the later value for that key will overwrite the previous one. If, however, the arrays contain numeric keys, the later value will not overwrite the original value, but will be appended.
Hence your issue above is expected.
hidden link
This part of the code is Custom Code, that is not using Toolset API or variables or structures, for a more customized help on this particular issue, I suggest to consult a certified partner.
https://toolset.com/consultant/
You will get the custom assistance you need to get on with your project.