Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #59631


Ignore:
Timestamp:
10/30/2023 03:45:18 PM (15 months ago)
Author:
alexstine
Comment:

Updated description per request here: https://wordpress.slack.com/archives/C02QB8GMM/p1698662803176509?thread_ts=1697671642.297739&cid=C02QB8GMM

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #59631 – Description

    initial v3  
    1 Despite setting a Plugin Header [https://make.wordpress.org/core/2021/06/29/introducing-update-uri-plugin-header-in-wordpress-5-8/ `Update URI` directive WP still will try to fetch the Update information (changelog) from a WP Org plugin.
     1Despite setting a [https://make.wordpress.org/core/2021/06/29/introducing-update-uri-plugin-header-in-wordpress-5-8/ Plugin Header] Update URI directive WP still will try to fetch the Update information (changelog) from a WP Org plugin.
    22
    3 And when filtering the `url` with [https://developer.wordpress.org/reference/hooks/update_plugins_hostname/ `update_plugins_{hostname}`] , it will simply load an instance of the `Add new` plugin screen in the ThickBox loaded when clicking `View version vx.x.x details`
     3And when filtering the url with [https://developer.wordpress.org/reference/hooks/update_plugins_hostname/ update_plugins_{hostname}] , it will simply load an instance of the "Add new plugin" screen in the ThickBox loaded when clicking "View version vx.x.x details"
    44
    55I am quite sure I do not miss anything, as I read through all the (undocumented) new feature announcements.
    66
    7 This is a minimal code you need to replicate the issue:
     7This is a minimal approach you need to replicate the issue:
    88
    9 1. Update plugin header directive to use `Update URI: https://domain.tld`
    10 2. Either hook into `update_plugins_{hostname}` and pass a `version` higher than your currently installed one, or
    11 2a. Hook into `pre_set_site_transient_update_plugins` and pass a new `new_version` higher than your currently installed one
    12 3. Of course make sure you do actually have a remote update
     9- Update plugin header directive to use `Update URI: https://domain.tld`
     10- Either hook into `update_plugins_{hostname}` and pass a version higher than your currently installed one, **or**
     11- Hook into `pre_set_site_transient_update_plugins` and pass a new `new_version` higher than your currently installed one
     12
     13Of course make sure you do actually have a remote update to be shown.
    1314==> You could also just edit the database entry of `_site_transient_update_plugins` to trigger the "has update" alert in the plugins list...
    1415
    15 All this makes the Update URI pretty much dysfunctional (in the sense that it is not really useful at all) and the developer still needs to manually filter the ThickBox content for the "View update details" or even for the "Plugin details"
    16 And the documentation about all this is either inexistent or very limited (opened a separate issue about ''that'' [here
     16All this makes the `Update URI` pretty much dysfunctional (in the sense that it is not really useful at all) and the developer still needs to manually filter the ThickBox content for the "View update details" or even for the "Plugin details".
     17And the documentation about all this is either inexistent or very limited (opened a separate issue about that [https://github.com/WordPress/Documentation-Issue-Tracker/issues/1194 here]
     18
     19IMO, passing a custom Update URI should completely unhook all Callisto the WP Org Api and either not allow to "view details" at all, or at least provide some ways to populate that window with custom details (or at least read from the plugin data, which it does not: it reads from remote).