[wp-trac] [WordPress Trac] #30855: wp_get_update_data() calls are not pluggable

WordPress Trac noreply at wordpress.org
Tue Sep 3 15:44:05 UTC 2024


#30855: wp_get_update_data() calls are not pluggable
----------------------------+------------------------------
 Reporter:  szepe.viktor    |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  4.1
 Severity:  normal          |  Resolution:
 Keywords:  close           |     Focuses:
----------------------------+------------------------------
Changes (by desrosj):

 * keywords:   => close
 * milestone:   => Awaiting Review


Comment:

 Sorry that this one took so long to receive a follow up @szepeviktor.

 Though it's not the only factor, I'm tempted to close this one out as
 `wontfix` because it seems that this is the only request for this in the 9
 years that have passed.

 For the initial request to make `wp_get_update_data()` function pluggable,
 that is a pattern that Core has moved away from and not something that
 will be implemented. Some new action or filter hooks can be considered if
 reasonable and beneficial.

 I looked at `wp_get_update_data()` and unless I'm missing it, that
 function does not result in any HTTP traffic (though it's possible that it
 did previously). It appears to only grab the related transients from the
 database and return the relevant parts. If the transients are not set or
 expired, it won't attempt to determine if there are updates.

 There is the `wp_get_update_data` filter that allows you to change the
 values returned by the function. I'm wondering if that works better for
 you than the `pre_site_transient_*` filters. Another way to address this
 would be adding a `pre_*` short-circuiting filter to return a custom
 generated value before the function's logic runs.

 But given that this will not help accomplish your intended goal of
 stopping all update related HTTP traffic (and questionable whether Core
 should make disabling updates like that easier), I think it's better to
 just close this out as `wontfix`. I'm going to mark as `close` candidate
 and allow a few weeks for additional feedback before closing out in case
 there are additional opinions.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/30855#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list