add_filter with retrieve_password_message() not working in plugin, but works in functions.php

add_filter with retrieve_password_message() not working in plugin, but works in functions.php

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)