function mymodule_civicrm_alterWorkflowMessage(string $name, $model) {
// Whenever there's an offline event registration, send BCC email. Get email addr from a custom-field.
if ($name === 'event_offline_receipt') {
/** @var \CRM_Event_WorkflowMessage_OfflineReceipt $model */
$customNotificationList = CustomValue::get('MyEventNotification')
->addWhere('entity_id', '=', $model->getEventId())
->addSelect('email')
->execute();
foreach ($customNotificationList as $customNotification) {
$model->addBcc(['email' => $customNotification['email']]);
}
}
}
Are there any examples of things in $params
that should be accessible in $model
but are not?