Title: constructor method for WP_Widget is deprecated
Last modified: August 30, 2016

---

# constructor method for WP_Widget is deprecated

 *  Resolved [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-3/)
 * Following WordPress 4.3 update:
 * Notice: The called constructor method for WP_Widget is deprecated since version
   4.3.0!
    Use __construct() instead.
 * “If you are sub classing a WordPress class and calling the PHP4 constructor, 
   you should update your code to use parent::__construct instead. You should also
   audit your own code to make sure it is using PHP5 style constructors.”
    [https://make.wordpress.org/core/2015/07/02/deprecating-php4-style-constructors-in-wordpress-4-3/](https://make.wordpress.org/core/2015/07/02/deprecating-php4-style-constructors-in-wordpress-4-3/)
 * “Here is a list of plugins (or rather the WordPress.org slugs for them) recently
   detected…
    [https://gist.github.com/chriscct7/d7d077afb01011b1839d](https://gist.github.com/chriscct7/d7d077afb01011b1839d)“
   Friends don’t let friends use PHP 4 style constructors.”
 * [https://www.google.com/search?q=called+constructor+method+for+WP_Widget+is+deprecated](https://www.google.com/search?q=called+constructor+method+for+WP_Widget+is+deprecated)
 * [https://wordpress.org/plugins/coolclock/](https://wordpress.org/plugins/coolclock/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-3/#post-6447664)
 * Hi leejosepho thanks for pointing this out. it’s fixed in the new release 🙂
 *  Thread Starter [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-3/#post-6447666)
 * I had checked each plugin I use against the list, and I would have been surprised
   if you had not been the first to respond!
 * Many thanks for your commitment and WordPress contributions.
 *  Thread Starter [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-3/#post-6447900)
 * Hello again, RavanH.
 * I am getting this at the Dashboard and also at the front of the site in my local
   installation:
 * > Strict Standards: Redefining already defined constructor for class CoolClock_Widget
   > in ~~~\wp-content\plugins\coolclock\coolclock.php on line 458
 * I have not yet checked a live site.
 *  Plugin Author [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-3/#post-6447901)
 * Hmmm… That should only show if you have E_STRICT error logging defined. I suppose
   I’ll need to drop all PHP4 backward compatibility to get rid of this Strict Standards
   notice.
 * Since WordPress doesn’t support PHP4 (since version 3.2) any more either it won’t
   be a big problem, so why not 😉
 *  Thread Starter [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-3/#post-6447902)
 * Sounds right to me!
 * Many thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘constructor method for WP_Widget is deprecated’ is closed to new replies.

 * ![](https://ps.w.org/coolclock/assets/icon-128x128.png?rev=1112137)
 * [CoolClock - a Javascript Analog Clock](https://wordpress.org/plugins/coolclock/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/coolclock/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/coolclock/)
 * [Active Topics](https://wordpress.org/support/plugin/coolclock/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/coolclock/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/coolclock/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-3/#post-6447902)
 * Status: resolved