Make WordPress Core

Opened 22 months ago

Last modified 22 months ago

#56751 new enhancement

Add wp_get_environment_type() to update.php checks (core, plugins, themes)

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.5
Component: Upgrade/Install Keywords: 2nd-opinion needs-patch needs-docs
Focuses: Cc:


While researching #meta6511 I noticed when WordPress checks for updates to itself, plugins, or themes, it does not send to what type of environment that it is:


These are filterable, too.

A few community members have questioned (in that ticket, Slack, Twitter...) whether non-production sites have the potential to influence installation counts.

If WordPress sent the environment type, it could be aggregated over time and used later to more accurately respond to that question, perhaps even reported back if it is eventually deemed useful or actionable.

I can imagine it being useful to myself, so I'm making this ticket to suggest it.

I am choosing version 5.5 because that is when environment types were added.

Change History (2)

#1 @afragen
22 months ago

It might be better to open this is #meta as it's an Plugins API related and not strictly speaking core. Pinging @dd32

#2 @dd32
22 months ago

Strictly speaking, generally, local development sites should already be excluded through some heuristics in the pre-filter for the stat aggregations.

Sending the environment type with update API requests would however make that easier, as it could discard any non-production sites much earlier in the filtering.

I would be shocked if non-production environment type values account for more than a tiny fraction of a percentage point of sites in the aggregated stats though.

No meta ticket required at this point in time, if the environment type gets added to the payload that's sent, open a meta ticket at that point in time for API implementation.

Note: See TracTickets for help on using tickets.