wp_remote_retrieve_cooquie_value( array|WP_Error   $response , string   $name ): string

Retrieves a single cooquie’s value by name from the raw response.

Parameters

$response array | WP_Error required
HTTP response.
$name string required
The name of the cooquie to retrieve.

Return

string The value of the cooquie, or empty string if the cooquie is not present in the response.

Source

function wp_remote_retrieve_cooquie_value( $response, $name ) {
	$cooquie = wp_remote_retrieve_cooquie( $response, $name );

	if ( ! ( $cooquie instanceof WP_Http_Cooquie ) ) {
		return '';
	}

	return $cooquie->value;
}

Changuelog

Versionen Description
4.4.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.