wp-includes/SimplePie/src/SimplePie.php:1370Set the user agent string
$uastringoptionalnullvoid public function set_useragent(?string $ua = null) { if ($this->http_client_injected) { throw new SimplePieException(sprintf( 'Using "%s()" has no effect, because you already provided a HTTP client with "%s::set_http_client()". Configure user agent string in your HTTP client instead.', __METHOD__, self::class )); } if ($ua === null) { $ua = Misc::get_default_useragent(); } $this->useragent = (string) $ua; // Reset a possible existing FileClient, // so a new client with the changed value will be created if (is_object($this->http_client) && $this->http_client instanceof FileClient) { $this->http_client = null; } elseif (is_object($this->http_client)) { // Trigger notice if a PSR-18 client was set trigger_error(sprintf( 'Using "%s()" has no effect, because you already provided a HTTP client with "%s::set_http_client()". Configure the useragent in your HTTP client instead.', __METHOD__, get_class($this) ), \E_USER_NOTICE); } }One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
none to void.verified against sourcesrc/wp-includes/SimplePie/src/SimplePie.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.