Open carlosGedesprin opened 2 years ago
That is technically possible, but this update checker doesn't provide it as a built-in feature. Instead, you would need to use some custom code to enable fully automatic updates for your plugin. WordPress has a few filters for that. See the Configuring Automatic Background Updates page for more information. The section "Plugin & Theme Updates via Filter" is particularly relevant:
Thanks you so much for this info. As a suggestion, it could be great to improve so good plugin library with an option who does this. Unfortunately I'm not very good with WP plugins otherwise I would offer to do it.
That has been suggested before in #121. Personally, I still think it seems too simple to be worth adding as an option: if someone knows enough about PHP and plugin development to successfully set up and use a custom update checker, they can probably write 4-5 lines of code to enable automatic background updates.
That said, I'll add this idea to the list of possible future enhancements.
Actually, WordPress built-in automatic update does work for me.
But. Enable/Disable auto-update link (on Plugins page) does not appear (after first install or until first successful get-metadata, not sure now) until clicking on plugin "Check For Updates" or after first automatic update check (12h).
Activating (forcing) automatic updates is as simple as adding your plugin to array of automatic update basenames.
$auto_updates = (array) get_site_option( 'auto_update_plugins', array() );
if ( ! in_array( $plugin->get_basename(), $auto_updates, true ) ) {
do something;
}
Unfortunately I deleted update code, can't remember details. Because I decided to leave auto-update decision to plugin administrators, and just show warning notice when auto-update is not enabled.
I'm not familiar with this plugin but it seems to tick all my boxes, so thanks YahnisElsts to offer it. One of the things I'm looking for is a way to update my plugin without the need of "human intervention". I would like my plugin to detect if a new version is available and if so install it silently. Am I a fool?