WordPress at a glance

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.

Code of wp_remote_retrieve_cookies: wp-includes/http.php VER 5.0.1

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