Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are multiple plugins that are staying in the
Auto-updates Disabled
bucket. Reported for Brodo but is happening in other sites as well.Changes in this Pull Request:
no-slug
is changed to an empty string. Useful to validate later withempty()
name
in two places:get_installed_plugin_version
which previously usedslug
in combination ofdirname
to get the version.name
iswoocommerce/woocommerce.php
. This value is never an empty string or NULL.get_plugins()
is executed only once when the class loads, and store and re-use it as an object propertyhas_delay_passed()
, if the slug is empty we will not be able to call Dotorg API. I saw plugins with empty slug stored both in GitHub and SVN/Trac, some with a changelog.txt and others didn't have explicit release versions, so I suspect it's nearly impossible to account for all of them. The safest case, IMO, is returningtrue
for these cases where theslug
is null.return true
option_name
was updated fromplugin_update_delay
toplugin_update_delay_2
, to make sure we start from scratch (especially since we are now using pluginname
instead ofslug
).Test
These changes were tested in Brodo Dev, and the number under
Auto-updates Disabled
is now 3, all justified.https://brodo-development-1712936759.mystagingwebsite.com/wp-admin/plugins.php
GitHub Issue:
https://github.com/a8cteam51/team51-dev-requests/issues/4479