Title: BWP using deprecated constructor
Last modified: August 30, 2016

---

# BWP using deprecated constructor

 *  [cadfile](https://wordpress.org/support/users/cadfile/)
 * (@cadfile)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/bwp-using-deprecated-constructor/)
 * Upgraded to 4.4 and getting the following error:
 * Notice: The called constructor method for WP_Widget is deprecated since version
   4.3.0! Use
 * __construct()
 * instead.
 * When I deactivate the plugin the error message goes away. I tried to find the
   error in the code but could not.
 * [https://wordpress.org/plugins/bwp-recent-comments/](https://wordpress.org/plugins/bwp-recent-comments/)

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

 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/bwp-using-deprecated-constructor/#post-6887637)
 * Hi there,
 * That’s a known issue and will be fixed in the next version.
 * If you want to use the current version, you can change the following line: [https://github.com/OddOneOut/bwp-recent-comments/blob/master/includes/class-bwp-rc-widget.php#L12](https://github.com/OddOneOut/bwp-recent-comments/blob/master/includes/class-bwp-rc-widget.php#L12)
 * to
 *     ```
       function __construct()
       ```
   
 * and it should work.
 *  Thread Starter [cadfile](https://wordpress.org/support/users/cadfile/)
 * (@cadfile)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/bwp-using-deprecated-constructor/#post-6887643)
 *     ```
       class BWP_RC_Widget extends WP_Widget
       {
       function BWP_RC_Widget()
       {
       $widget_ops = array('classname' => 'bwp-rc-widget', 'description' => __( 'Show a list of recent comments/trackbacks generated by the BWP Recent Comments plugin.', 'bwp-rc') );
       $control_ops = array('width' => 350);
       $this->WP_Widget('bwp_recent_comments', __('BWP Recent Comments', 'bwp-rc'), $widget_ops, $control_ops);
       }
       ```
   
 * Won’t that overwrite the class BWP_RC_Widget and give me a different error
 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/bwp-using-deprecated-constructor/#post-6887644)
 * No you only have to replace line 12 (should be highlighted in the link I posted
   above).
 *  Thread Starter [cadfile](https://wordpress.org/support/users/cadfile/)
 * (@cadfile)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/bwp-using-deprecated-constructor/#post-6887651)
 * I replaced function BWP_RC_Widget() with function __construct() and still get
   the same depreciated error message
 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/bwp-using-deprecated-constructor/#post-6887910)
 * Sorry for my late reply.
 * That’s weird, I’ve applied the patch and it’s working for me: [https://github.com/OddOneOut/bwp-recent-comments/commit/379d9b6513d75fa455f890dcf51e2e9b6f8348f2](https://github.com/OddOneOut/bwp-recent-comments/commit/379d9b6513d75fa455f890dcf51e2e9b6f8348f2)

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

The topic ‘BWP using deprecated constructor’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bwp-recent-comments.svg)
 * [Better WordPress Recent Comments](https://wordpress.org/plugins/bwp-recent-comments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bwp-recent-comments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bwp-recent-comments/)
 * [Active Topics](https://wordpress.org/support/plugin/bwp-recent-comments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bwp-recent-comments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bwp-recent-comments/reviews/)

## Tags

 * [deprecated](https://wordpress.org/support/topic-tag/deprecated/)
 * [error message](https://wordpress.org/support/topic-tag/error-message/)
 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * 5 replies
 * 2 participants
 * Last reply from: [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/bwp-using-deprecated-constructor/#post-6887910)
 * Status: not resolved