alterMailParams hook: get_template_vars() no longer has `contact` key
Overview
I wrote a alterMailParams
hook:
/**
* @param $params
* @param $context
*
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
public function alterMailParams(&$params, $context)
{
$templateVars = CRM_Core_Smarty::singleton()->get_template_vars();
Now $templateVars
no longer has 'contact'
key and I can no longer access the data of the contact I am writing to.
Environment information
- CiviCRM: 5.45.1
- PHP: 7.4
- CMS: Wordpress 5.8.3
- Database: MySQL 8
- Web Server: Apache 2.4/Nginx 1.16/...