Retrieves a single cookie’s value by name from the raw response.
Parameters
$responsearray|WP_Errorrequired- HTTP response.
$namestringrequired- The name of the cookie to retrieve.
Source
function wp_remote_retrieve_cookie_value( $response, $name ) {
$cookie = wp_remote_retrieve_cookie( $response, $name );
if ( ! ( $cookie instanceof WP_Http_Cookie ) ) {
return '';
}
return $cookie->value;
}
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.