Title: sanitize_comment_cookies
Published: April 25, 2014
Last modified: August 20, 2026

---

# do_action( ‘sanitize_comment_cookies’ )

## In this article

 * [Source](https://developer.wordpress.org/reference/hooks/sanitize_comment_cookies/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/hooks/sanitize_comment_cookies/?output_format=md#changelog)

Fires when comment cookies are sanitized.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/sanitize_comment_cookies/?output_format=md#source)󠁿

    ```php
    do_action( 'sanitize_comment_cookies' );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-settings.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-settings.php#L643)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-settings.php#L643-L643)

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/sanitize_comment_cookies/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.0.11](https://developer.wordpress.org/reference/since/2.0.11/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fsanitize_comment_cookies%2F)
before being able to contribute a note or feedback.