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
Branches
No related tags found
No related merge requests found
......@@ -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.
Please register or to comment