W3cubDocs

/WordPress

wp_clearcookie()

This function has been deprecated. Use wp_clear_auth_cookie() instead.

Clears the authentication cookie, logging the user out. This function is deprecated.

Description

See also

Source

File: wp-includes/pluggable-deprecated.php

function wp_clearcookie() {
	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_clear_auth_cookie()' );
	wp_clear_auth_cookie();
}

Changelog

Version Description
2.5.0 Use wp_clear_auth_cookie()
1.5.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_clearcookie