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' => isset( $cookie->attributes['expires'] ) ? $cookie->attributes['expires'] : null, 'path' => isset( $cookie->attributes['path'] ) ? $cookie->attributes['path'] : null, 'domain' => isset( $cookie->attributes['domain'] ) ? $cookie->attributes['domain'] : null, 'host_only' => isset( $cookie->flags['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.