WordPress at a glance
Home All Function Functions APIs HTTP API

wp_remote_retrieve_cookies() WP 1.0

Retrieve only the cookies from the raw response.

Is the basis for: wp_remote_retrieve_cookie()

No Hooks.


Array. An array of WP_Http_Cookie objects from the response. Empty array if there are none, or the response is a WP_Error.


wp_remote_retrieve_cookies( $response );
$response(array) (required)
HTTP response.


Since 4.4.0 Introduced.

Code of wp remote retrieve cookies: wp-includes/http.php WP 5.2.4

function wp_remote_retrieve_cookies( $response ) {
	if ( is_wp_error( $response ) || empty( $response['cookies'] ) ) {
		return array();

	return $response['cookies'];

Related Functions

From tag: HTTP API (curl remote)

No comments
    Hello, !     Log In . Register