Core Function
View Source on Trac ↗ wp_remote_retrieve_cookie()
wp_remote_retrieve_cookie( mixed $response, mixed $name ) Retrieves a single cookie 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
((WP_Http_Cookie)
(WP_Http_Cookie | string) The `WP_Http_Cookie` object, 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