We are also getting this same error since upgrading to WordPress 5.4 today.
PHP Deprecated: contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
I did a site-wide search and found your plugin uses ‘contextual_help’.
I deactivate SendGrid only, and the error goes away, hence this error is definitely caused by SendGrid.
To correct this change this file
wp-content/plugins/sendgrid-email-delivery-simplified/lib/class-sendgrid-settings.php
Change line 52 to
add_filter( 'current_screen', array( __CLASS__, 'show_contextual_help' ), 10 );
And the show_contextual_help method (starts on line 101)
public static function show_contextual_help()
{
$screen = get_current_screen();
if ( SENDGRID_PLUGIN_STATISTICS == $screen->id or SENDGRID_PLUGIN_SETTINGS == $screen->id ) {
$screen->add_help_tab(
array(
'id' => 'sendgrid_help_tab',
'title' => __( 'Help' ),
'content' => file_get_contents( dirname( __FILE__ ) . '/../view/sendgrid_contextual_help.php' )
)
);
}
}
Same error as well. Sendgrid Support has not responded.
Been noticing the same error.
Sent a ticket into SendGrid about this – I’ll update this post if I hear anything.
-
This reply was modified 11 months, 3 weeks ago by
blockmonkey.
Well they finally replied to the ticket.
“At this time, our engineering team does not have any plans to update the WordPress plugin or make any additional changes. I sincerely apologize for any inconvenience caused.”
Thanks @chrome-orange for the solution.
I deactivated the Sendgrid plugin, and edited the ~/lib/class-sendgrid-settings.php file with the built-in WordPress Plugin Editor with the code from your post (I replaced both line 52 and the show_contextual_help() function code as you outlined), updated the file and reactivated the plugin and it all seems to work now without the error.