Google Maps: Notice dispalyed with debug on

Getting the following message displayed on the site on when Google Maps Plugin is enabled:

Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct() instead. in <INSTALL_PATH>/wp-includes/functions.php on line 3457

Notice goes away when plugin is disabled.

  • Vinod Dalvi

    Hi @Kristie,

    I hope you are well today and thanks for posting on the forum.

    I could confirm the warning message on my test site using latest version of Google Maps plugin therefore i have notified the plugin developer about this so that it can be fixed.

    This is a simple PHP warning/notice and most of the time it doesn't affect functionality of site so it is nothing to worry about!

    Do you have WP_DEBUG set to true in your wp-config.php file?

    If you do then please set it to false.
    This will hide the warning messages and you will be able to use your site normally.

    For information on this, checkout this article.

    If you don't want to resolve the warning message in the plugin then you can do so by editing the following file of Google Maps plugin on line number 8 as displayed below.

    Google Maps plugin file :

    Before Editing :
    parent::WP_Widget( false, $name = 'Google Maps Widget' );

    After Editing :
    parent::__construct( false, $name = 'Google Maps Widget' );

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.