X

How to fix the deprecated blacklist_keys” option key problem in Contact Form 7 in WordPress?

Last updated: 20210214

 

If you get the error message when sending a message in Contact Form 7 on your WordPress:

Deprecated: get_option was called with an argument that is deprecated since version 5.5.0! The “blacklist_keys” option key has been renamed to “disallowed_keys”. in /wp-includes/functions.php on line 5143

 

Then simply do this:

I was able to remove this error by changing the following at contact-form-7\modules\disallowed-list.php, line 51:

$mod_keys = trim( get_option( 'blacklist_keys' ) );

to

$mod_keys = trim( get_option( 'disallowed_keys' ) );

Reference:

https://github.com/takayukister/contact-form-7/issues/170

Bad Joe: