thanks to @pradpnayak for guidance :D
according to the docs for hook_civicrm_alterMailParams:
You can add custom headers by appending to $params['headers']. Example:
$params['headers']['X-My-Header'] = 'my header value';
The headers key may not exist in the $params array when passed into the > hook.
so this was the code in an extension to unset ...
This case has been solved in adding this two lines in the wp_config.php file after the define section:
ini_set('error_reporting', E_ALL );
It is also important to solve it because it can have consequences for CiviCRM (for us in the import process).
Hope this helps