Customized wp_new_user_notification

Customized wp_new_user_notification

I’m kind of inexperienced with it comes to editing WordPress functions, yet i’m currently trying to customize wp_new_user_notification in order to personalize the email that administrators and users receive once they register. I’m aware there’s some plugins that allow this kind of customization, but I would rather spend some more time on a problem and try to learn/understand it, rather than just install a plugin.
Hence, I’ve placed this function in my functions.php, and I believe I’m supposed to add one or more filters, such as:

add_filter('myfunction', 'wp_new_user_notification', ?, ?)

or maybe not. I’ve read and attempted to follow several tips/tutorials/questions (such as for example), but no matter what I do, I keep receiving emails with standard text/contents (as if my functions is not being considered by WordPress).

Can anyone help me solve this problem? Thanks in advance!

2 Answers
2

You can only override pluggable functions in a plugin, not via functions.php. The function is already defined when functions.php is loaded, which is why your overriding function is skipped. Move the code to your own plugin to enable it.

Leave a Comment