The “issue” is that WP Site Health is reporting this as a critical issue. I understand of course why that is but maybe a client would see that as an issue. Any way around this, or am I missing something?
One of the recommendations of Site Health is to have automatic updates enabled.
So when you disable them with the filter, regardless of whether you use Code Snippets or not, the Site Health raises an issue.
Unfortunately, MainWP doesn’t support hiding that Site Health issue on the child site.
The automatic updates provided by MainWP offer more flexibility and, thus, stability when compared to the stock WP automatic updates, so if a client brings up the Site Health issue, perhaps that advantage can be communicated to them.
I’m using the same code snippets via a must-use-plugin, but that should work the same way. Additionally I have the following rule and I don’t see warnings in site health, so it might be the key for you as well:
/** Disable the possibility to enable automatic updates for WP core (WP 5.6) */
add_filter( 'allow_major_auto_core_updates', '__return_false' );
@josklever I think I came across your solution with the mu plugin, just thought for simplicity sake I use the code snippets. To be honest, not sure if that was the best idea as atm I am still confused as where the filters get added. I was looking for them in the wp-admin/ functions.php and the theme functions.php and can not find them.
While researching the topic I came across another post from a wp plugin where a user suggest to the dev to add
I believe this relates to define('AUTOMATIC_UPDATER_DISABLED', true);
in the config.php, yet this also could be a solution. The things is that I am not sure of where if would add that above filter. Maybe you would have an idea?
I’m using the mu-plugin route so I can manage it a little better for a large number of sites. But it should work the same.
I think the snippets are stored in and loaded from the database, as long as you use the correct option “Execute on Child Sites”.
The snippet you mention specifically for the site health section is new to me, so I haven’t used that.