Ok.
I created file my_hook.php inside includes/hook folder.
I put such code inside this file (code from devdocs):
function my_hook_for_custom_field ( $vars ) {
$merge_fields = array();
$merge_fields['my_custom_var'] = "My Custom Var";
$merge_fields['my_custom_var2'] = "My Custom Var2";
return $merge_fields;
}
add_hook( 'EmailPreSend', 1, 'my_hook_for_custom_field' );
and put {$my_custom_var} inside email template. And still can't see value. Where is an error?