Jetpack hooks into the wpmu_new_blog action in two places:
https://github.com/Automattic/jetpack/blob/ca7c26b/modules/likes.php#L80
https://github.com/Automattic/jetpack/blob/b578d60/class.jetpack-network.php#L76
WP 5.1 deprecated that hook in favor of wp_insert_site and wp_initialize_site.
Because of that, notices are being triggered when any plugin calls wp_insert_site(), even if that plugin uses the new hooks correctly. The notice is triggered if any active plugin is using the deprecated hooks. Because of that, local development workflows are broken by headers already sent crashes, and production error logs are cluttered with noise, making them less useful.
Steps to reproduce the issue
- Activate latest JP on WP 5.1
- Call
wp_insert_site() from an mu-plugin, wp shell, etc
What I expected
No notices should be triggered.
What happened instead
A notice was triggered.
Screenshots

Jetpack hooks into the
wpmu_new_blogaction in two places:https://github.com/Automattic/jetpack/blob/ca7c26b/modules/likes.php#L80
https://github.com/Automattic/jetpack/blob/b578d60/class.jetpack-network.php#L76
WP 5.1 deprecated that hook in favor of
wp_insert_siteandwp_initialize_site.Because of that, notices are being triggered when any plugin calls
wp_insert_site(), even if that plugin uses the new hooks correctly. The notice is triggered if any active plugin is using the deprecated hooks. Because of that, local development workflows are broken byheaders already sentcrashes, and production error logs are cluttered with noise, making them less useful.Steps to reproduce the issue
wp_insert_site()from an mu-plugin,wp shell, etcWhat I expected
No notices should be triggered.
What happened instead
A notice was triggered.
Screenshots