• Hi, I am getting the below error message when i am activating ” Collapsing Categories” in WordPress 4.7.

    Notice: The called constructor method for WP_Widget in collapsCatWidget is deprecated since version 4.3.0! Use
    __construct()

    ….mysite\wp-includes\functions.php on line 3846 Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method collapsCat::init_textdomain() should not be called statically in ….mysite\wp-includes\class-wp-hook.php on line 298

    Please guide me

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes, I am getting this same issue in debug mode. Is there a resolve or update for this plugin to correct this error?

    Notice: The called constructor method for WP_Widget in WCC_widget is deprecated since version 4.3.0! Use
    __construct() instead.

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

    No reply? Well, this is what I came up with. Since there is no update or reply. This might help until they see that it needs to be updated.

    https://stackoverflow.com/questions/32860218/the-called-constructor-method-for-wp-widget-is-deprecated-since-version-4-3-0

    Ok, in this file in plugin: woocommerce-collapsing-categories/includes/class-wcc-widget.php

    Change: parent::WP_Widget to parent::__construct

    <?php
    class WCC_widget extends WP_Widget {

    parent::WP_Widget {

    /* Widget settings. */
    $widget_ops = array( ‘description’ => __(‘Create an expandable list of product categories and subcategories.’,’wa_wcc_txt’));

    parent::__construct( false, __( ‘WC Categories’, ‘wa_wcc_txt’), $widget_ops );

    }

    • This reply was modified 7 years, 7 months ago by derekwcodes.
    • This reply was modified 7 years, 7 months ago by derekwcodes.
    • This reply was modified 7 years, 7 months ago by derekwcodes.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting Error Message in wordpress 4.7’ is closed to new replies.