Activate the opt-in checkbox for comment cookies in WordPress

In the last few weeks I've been asked more and more why my WordPress themes don't show the checkbox for comment cookies, which was introduced with WordPress 4.9.6. The reason for this is not a bug, but changes in the WordPress core itself. Therefore, I would like to briefly show you how you can activate the opt-in checkbox for comment cookies in WordPress.

For understanding, here is a screenshot of the opt-in checkbox for comment cookies:

WordPress Comments Cookie Checkbox

What are comment cookies?

In principle, no cookies are required for the comment function of WordPress. The data of a comment such as name, e-mail and content are recorded by the comment form and stored in the WordPress database. The data processing of the comments should therefore also be listed in the data protection declaration.

WordPress has always had a feature for a little more convenience with regular commentators. When sending a comment for the first time, WordPress remembered the name, e-mail and website of the user and automatically filled in these input fields for the next comment so that the information did not have to be entered again.

The form data was saved locally with a cookie in the user's browser. Because the creation of a cookie without explicit consent is problematic with the GDPR, this feature has undergone some changes in the last WordPress core updates:

Up to WordPress 4.9.5

Up to WordPress 4.9.5, the form data of the comments were generally saved in a cookie without asking for the user's consent.

WordPress 4.9.6

With version 4.9.6 a new checkbox was introduced, which obtained the consent of the user to save the form data. You have probably seen the option to save my name, email and website in this browser until I comment again , including here on my blog.

WordPress 4.9.8

Somewhat unnoticed, another change took place in the update to 4.9.8. Now the checkbox for comment cookies is only displayed if it has been activated in the WordPress settings.

Show the opt-in checkbox for comment cookies in WordPress

You can find the new option under Settings → Discussion in the WordPress backend. The feature can now be activated or deactivated with the new setting Show opt-in checkbox for comment cookies .

Activate the checkbox for comment cookies in WordPress

By default, the setting and the comment cookies are now completely deactivated and the convenience function for saving the form data is not available to any user.

Administrators can activate the feature with the new setting, after which the checkbox is displayed in the comments. Commenters can now have their form data saved with the comment cookie if they wish.

Both options - feature activated or deactivated - are therefore data protection compliant. Either a) cookies are never saved or b) cookies are only saved with the consent of the user.

Please note that the checkbox is generally not displayed for logged in users. You must therefore log out of your own website or call it up in another browser to test it.

Conclusion

The last WordPress core updates were very confusing in this regard. With 4.9.6 the checkbox was automatically displayed, a little later in 4.9.8 it was removed and must first be activated in the options. I hope this post helps clarify something.