I hame some input fields on my comment form, that I show for non-registered members. They are: ‘name’, ‘email’ and ‘comment text’.
And my task was to add string “Guest” to text user typed in the field ‘name’. So I created extension where I use ‘insert_comment_insert_array’ hook:
public function concat_username($data)
{
if($data['author_id'] != 0)
return $data;
$data['name'] = "Guest ".$data['name'];
return $data;
}
And it works. But new comment email notifications that I receive after new comment was posted contain user name without my string “Guest”.
May be anyone knows what’s wrong?