diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
index eb45efc9fd..9cec9cb3b4 100644
--- a/src/wp-includes/comment.php
+++ b/src/wp-includes/comment.php
@@ -583,7 +583,7 @@ function wp_set_comment_cookies( $comment, $user, $cookies_consent = true ) {
 
 	if ( false === $cookies_consent ) {
 		// Remove any existing cookies.
-		$past = time() - YEAR_IN_SECONDS;
+		$past = time() - apply_filters( 'comment_cookie_lifetime', YEAR_IN_SECONDS );
 		setcookie( 'comment_author_' . COOKIEHASH, ' ', $past, COOKIEPATH, COOKIE_DOMAIN );
 		setcookie( 'comment_author_email_' . COOKIEHASH, ' ', $past, COOKIEPATH, COOKIE_DOMAIN );
 		setcookie( 'comment_author_url_' . COOKIEHASH, ' ', $past, COOKIEPATH, COOKIE_DOMAIN );
