wp-includes/class-wp-http-requests-response.php:160Retrieves cookies from the response.
WP_Http_Cookie[] public function get_cookies() { $cookies = array(); foreach ( $this->response->cookies as $cookie ) { $cookies[] = new WP_Http_Cookie( array( 'name' => $cookie->name, 'value' => urldecode( $cookie->value ), 'expires' => $cookie->attributes['expires'] ?? null, 'path' => $cookie->attributes['path'] ?? null, 'domain' => $cookie->attributes['domain'] ?? null, 'host_only' => $cookie->flags['host-only'] ?? null, ) ); } return $cookies; }Introduced in 4.6.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
WP_HTTP_Cookie[] to WP_Http_Cookie[].verified against sourcesrc/wp-includes/class-wp-http-requests-response.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.