WPDev.one
Core Function
View Source on Trac ↗

wp_remote_retrieve_cookie_value()

wp_remote_retrieve_cookie_value( mixed $response, mixed $name )

Retrieves a single cookie's value by name from the raw response.

Parameters 2 required

Name / Type Description
(array

| WP_Error) $response HTTP response.

Required
$name
string

The name of the cookie to retrieve.

Required

Return Value

(string)
string The value of the cookie, or empty string if the cookie is not present in the response.

Function Information

Since Version
4.4.0
Source File
wp-includes/http.php
Advertisement