WordPress / health-check

Health Check is a WordPress plugin that will perform a number of checks on your WordPress install to detect common configuration errors and known issues.
GNU General Public License v2.0
174 stars 51 forks source link

Override option to re-enable automatic updates when .git is present #398

Closed Vilasamuni closed 3 years ago

Vilasamuni commented 3 years ago

When Health Check detects a .git directory it disables automatic updates. This is definitely a good default to protect people from all sorts of VCS-related mess, but I want a way to override this behaviour and re-enable automatic updates, and I haven't found any documentation on this in my searches yet.

I want to keep .git in the root of my WP install so I can track settings in .htaccess as well as custom themes and plugins, but I want to automatically install updates for WP core and non-custom themes and plugins. Is there a way to override this and say "I know what I'm doing, please enable auto updates even though .git is present"?

Related: https://github.com/WordPress/health-check/issues/323

TimothyBJacobs commented 3 years ago

This doesn't really have anything to do with Health Check. That functionality is baked into the automatic updater. You can override that check using a filter: https://developer.wordpress.org/reference/hooks/automatic_updates_is_vcs_checkout/