Stop WordPress saving commenters' name, email and website in cookies, and remove the "Save my name" checkbox.
add_action( 'init', function (): void {
remove_action( 'set_comment_cookies', 'wp_set_comment_cookies' );
} );
add_filter( 'comment_form_default_fields', function ( array $fields ): array {
unset( $fields['cookies'] );
return $fields;
} );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
When someone comments, WordPress can save their name, email and website in cookies for a year so the form is pre-filled next time. If you don’t want to set those cookies, or list them in your cookie policy, this snippet turns them off.
WordPress sets the cookies from wp_set_comment_cookies(), hooked to set_comment_cookies. Removing it means no comment cookies are ever saved.
The consent checkbox under the comment form is removed with comment_form_default_fields, since there’s nothing to agree to.
Leave a comment while logged out. Your browser’s cookies should have no comment_author_ entries, and the comment form should have no “Save my name” box.