workflow_action_presend_messages

Triggered before the queue of messages to be sent upon the execution of a request action is formed.

Helpdesk

Input (passed by reference)

$params['messages'] array Messages to be sent upon the execution of a request action. A plugin can change their properties; e.g., text templates.
… your plugin code …

Output

Helpdesk

Plugin code example

PHP

public function workflowActionPresendMessages(&$params)
{
    $messages = &$params['messages'];
    array_walk($messages, function(&$message) {
        $message['tmpl'] .= '<p>' . _wp('Best regards')
            . '<br>'
            . wa()->getSetting('name', '', 'webasyst');
    });
}