When WordPress is installed, it sends a notification
New WordPress Site
Your new WordPress site has been successfully set up at:
...
I would like to change the text of the e-mail but am not successfull. Here is what I tried:
I added the following code to the main file of a plugin which I add before the installation
function changed_install_mail($installed_email, $user, $blog_title, $blog_url, $password ) {
$installed_email['subject'] = 'test';
return $installed_email;
}
add_filter( 'wp_installed_email', 'changed_install_mail', 10, 5 );
I tried to play around with the priority, but the filter never gets added. But other code in this plugin file is executed.
This filter gets applied in upgrade.php
$installed_email = apply_filters( 'wp_installed_email', $installed_email, $user, $blog_title, $blog_url, $password );
Maybe it's the wrong time or wrong location I'm trying it?