Git-updater: Automatic updates supposed to work?

Created on 18 May 2017  Â·  15Comments  Â·  Source: afragen/git-updater

Hello
I am using this plugin, and I thought my github plugins would upgrade automatically when updates are available.
My WP dashboard detects new versions of the standard wp.org plugins, and also new versions of my Github (public) plugins.
Although, only the wp.org plugins are updated automatically. My github plugins are not updated.

And yes, I can update my github plugins manually in the plugins page.

Is there something I should know or setup?
How can I debug this?
Kind regards

Aditionnal info:

cant-fix

All 15 comments

What are you doing so that your other plugins update automatically?

WP automatic updates are configured by default actually.
It's standard behaviour unless you decide to disable them.
Full doc here: https://codex.wordpress.org/Configuring_Automatic_Background_Updates

WordPress minor versions, plugins updates, translations are all updated automatically.

There are constants and filters that can be used to disable certain types updates.

I don't see why Github Updater cannot launch auto updates, since it can detect new versions.
Can you explain what could be missing to enable automatic updates?

It seems you already work on some features regarding automatic updates in this issue #320.
I cannot confirm that this is working.

Thank you

I'm just trying to confirm that you have add_filter('auto_update_plugin', '__return_true'); set.

This filter should be active.
I am forcing it, just to be sure.

But forcing the auto updates doesn't update the github plugins.
I will wait till tomorrow to check if the auto update triggers automatically.

I'm trying to test this locally but it seems only to trigger from the wp-cron job.

I'm looking really hard but I can't seem to find where in core the actual update happens. Even when setting breakpoints throughout the updater classes. In all honestly it's difficult to actually see when the 'auto_update_plugin' hook fires.

@nicomollet I've spent about 4 hours trying to trace how using the 'auto_update_plugin' hook works and I can't find it. I have no idea about the filter recommended in #320, I took it on faith from the OP that it worked.

Unfortunately I don't think I can fix this. Sorry.

If you figure something out let me know.

You should be able to use webhooks to automatically update your plugins. Refer to the wiki.

The apply_filters is called here https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/class-wp-automatic-updater.php#L179

I will try to find a solution, as background updates are important to me.

Thank you for the time spent on this

Well, forcing all plugin updates finally worked.

My initial setup included using this "Easy updates manager" plugin:
https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/
It allows to select individually what plugins should be updated automatically. I was indeed selecting my github plugins for background updates.

So, I changed from "select individually" to "enabled".
Image of plugin.
And this morning, WP cron triggered the updates for my github plugins.

In the end, I am not sure if a fix is possible, maybe it has more to do with the "Easy updates manager" plugin.

@nicomollet I found the above referenced hook and I was able to trigger it more frequently by adding a single wp-cron job similar to how core does. I could get a dot org plugin to update with a couple of page refreshes but after setting breakpoints in almost every conceivable place I was unable to capture the actual process of updating. Because of that I was unable to debug it.

The simplified version of the auto_update_plugin call above should refer to all plugins. Perhaps trying to force a wp-cron job wasn't working as I thought. ¯\_(ツ)_/¯

I will try to debug it when my github plugins have new versions. They are all updated now ;)

I'm curious to know if the updater.lock hook is even required. I've done a lot to ensure that the update transient is correct under as many circumstances as I can find.

@nicomollet I'm testing a solution to auto updating. I'll report back here after testing.

I've tried just about everything I can think of and continually hit roadblocks. Sorry.

@afragen thak you for the time you invested in this. I think there is a conflict in my setup with this plugin
https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/

You can close this ticket if you want, I will update it anyway if I find a solution.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wormeyman picture wormeyman  Â·  5Comments

warudin picture warudin  Â·  7Comments

uturnr picture uturnr  Â·  14Comments

pnoeric picture pnoeric  Â·  9Comments

therealgilles picture therealgilles  Â·  4Comments