Notice: The Called Constructor Method For WP_Widget Is Deprecated Since Version 4.3.0! Use __construct()

Heads up: This page may include affiliate links. Read the full disclosure.

We had an update recently to WordPress 4.3 that caused a few plugins to have some notices displayed on your websites and blogs. This is normal, over time old code and methods of doing things are deprecated, meaning they are “retired” from normal everyday use. The notice actually gave you a LOT of time to fix your code, as these are PHP4 style constructors.

When you get a notice on your screen similar to the one above (which may also refer to WordPress files like pluggable.php), just go to your plugin editor (plugins, editor) and change the following:

$this->WP_Widget(

into something like this (in an upcoming post we’ll talk about why you use the double-colon scope resolution operator in a class)

parent::__construct(

Hit “Update File” at the bottom and if all goes according to plan, your problems are permanently taken care of. At least, until the next plugin update, in which the developer hopefully takes care of the issue also.

construct

3 thoughts on “Notice: The Called Constructor Method For WP_Widget Is Deprecated Since Version 4.3.0! Use __construct()”

Comments are closed.

Looking for something?

Privacy laws apply to businesses that collect personal information. Since no personal information is collected by the MainWP plugins, no privacy laws apply to the MainWP plugins. This includes GDPR, UK DPA 2018, PIPEDA, Australia Privacy Act 1988, LGPD, PIPL, and other privacy laws.
Donata Stroink-Skillrud
Donata Stroink-Skillrud
President of Agency Attorneys

Your Download Is Just One Click Away

…or just download the plugin.

By entering your email, you agree to our Terms of Service and Privacy Policy.