• Plugin: wp-google-search
    Notice The called constructor method for WP_Widget in WGS_Widget is deprecated since version 4.3.0! Use __construct() instead. wp-includes/functions.php:3846

    Call Stack
    _deprecated_constructor()
    wp-includes/class-wp-widget.php:200
    WP_Widget->WP_Widget()
    wp-content/plugins/wp-google-search/wgs-widget.php:7
    WGS_Widget->__construct()
    wp-includes/class-wp-widget-factory.php:106
    WP_Widget_Factory->register()
    wp-includes/widgets.php:113
    register_widget()
    wp-content/plugins/wp-google-search/wgs-widget.php:92
    wgs_widget_init()
    wp-includes/class-wp-hook.php:298
    do_action(‘widgets_init’)
    wp-includes/widgets.php:1474
    wp_widgets_init()
    wp-includes/class-wp-hook.php:298
    do_action(‘init’)
    wp-settings.php:449

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author WebshopLogic

    (@webshoplogic)

    Thank you for let us know it.
    This is only a notice, you can use the plugin without any problem regardless of this message.
    We will change the code in the next release.

    Yep, the same thing… After each upload a page:

    PHP Notice: The called constructor method for WP_Widget in WGS_Widget is deprecated since version 4.3.0! Use

    __construct()

    instead. in D:\OpenServer\domains\rehub\wp-includes\functions.php on line 3767

    WP ver. 4.6.1

    • This reply was modified 7 years, 11 months ago by Berdych.
    • This reply was modified 7 years, 11 months ago by Berdych.

    How do I get the updated version?

    Plugin Author WebshopLogic

    (@webshoplogic)

    The plugin has not modified yet, the change will be included in version 1.0.6.
    This is only a warning, thus the plugin can be used until the next version is released.

    • This reply was modified 7 years, 10 months ago by WebshopLogic.

    to hide the message until update you can turn debug to false

    I solved the error message by modifying wp-google-search/wgs-widget.php as follow:

    parent::__construct(false, $name = __('WP Goosgle Search (WGS)','wgs'));

    instead of

    parent::WP_Widget(false, $name = __('WP Goosgle Search (WGS)','wgs'));

    @webshoplogic any GitHub repo to send a PR?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Deprecated constructor’ is closed to new replies.