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, 9 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-6/)
 * 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/list-category-posts/](https://wordpress.org/plugins/list-category-posts/)

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

 *  Plugin Author [Fernando Briano](https://wordpress.org/support/users/fernandobt/)
 * (@fernandobt)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-6/#post-6448601)
 * Thanks for reporting this. I’ll try to release an updated version during the 
   weekend.
 * Cheers!
 *  Thread Starter [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-6/#post-6448629)
 * Got it, and many thanks!
 *  [don_alejandro](https://wordpress.org/support/users/don_alejandro/)
 * (@don_alejandro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-6/#post-6448632)
 * Thanks for the update, but I’ve had a consistent glitch in updating the lcp plugin.
 * I updated three live sites and three sites on my testing server, and each time
   the ‘update’ killed the plugin – WordPress deactivated due to an error or, if
   the plugin was deactivated when I applied the update, attempting to activate 
   it after the update produced an error message something like ‘no plugin file’.
 * In all six cases I deleted the lcp plugin (and files), and reinstalled a fresh
   copy from the ‘add new’ plugin menu, which worked perfectly (and resolved the
   constructor deprecation warnings). Could the ‘update’ version be missing something?
 *  Thread Starter [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/constructor-method-for-wp_widget-is-deprecated-6/#post-6448633)
 * I discovered the same kind of problem after having made my post here. At one 
   site, the plugin seemed to update just fine but then I later received a notice
   at the Dashboard saying the plugin had been deactivated because a file was missing.
   Reactivation took care of that.
 * At another site and following the update that also seemed to be fine, I later
   received notice of two plugins needing updates and discovered my Dashboard showing
   two copies of this one with the newer version active and the older version not.
   At that point I began to delete the older one but stopped because WordPress was
   going to delete both, so I just deactivated the active one and the other disappeared.

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

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

 * ![](https://ps.w.org/list-category-posts/assets/icon-256x256.png?rev=2517221)
 * [List category posts](https://wordpress.org/plugins/list-category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/list-category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-category-posts/reviews/)

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