Skip to content
Snippets Groups Projects
Unverified Commit 554eb99e authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Minor cleanup

parent 1d627106
No related branches found
No related tags found
1 merge request!466CRM-21020 add additional params and example
......@@ -19,15 +19,17 @@ tokenizing it.
## Example
/**
* Implement hook_civicrm_alterMailContent
*
* Replace invoice template with custom content from file
```php
/**
* Implement hook_civicrm_alterMailContent
*
* Replace invoice template with custom content from file
*/
function mail_civicrm_alterMailContent(&$content) {
if (CRM_Utils_Array::value('valueName', $content) == 'contribution_invoice_receipt') {
$path = CRM_Core_Resources::singleton()->getPath('org.myorg.invoice');
$html = file_get_contents($path.'/msg/contribution_invoice_receipt.html.tpl');
$content['html'] = $html;
}
function mail_civicrm_alterMailContent(&$content) {
if (CRM_Utils_Array::value('valueName', $content) == 'contribution_invoice_receipt') {
$path = CRM_Core_Resources::singleton()->getPath('org.myorg.invoice');
$html = file_get_contents($path.'/msg/contribution_invoice_receipt.html.tpl');
$content['html'] = $html;
}
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment