Support » Plugin: MailChimp List Subscribe Form » PHP7 Compatibility EASY FIX use __construct()

  • Resolved Jer Clarke


    Hi, there’s a small but important bug in your code as interepreted by PHP7:

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; mailchimpSF_Widget has a deprecated constructor in /SITE/wp-content/plugins/mailchimp/mailchimp_widget.php on line 473

    All you need to do to fix it is use __construct() rather than the class name in the constructor function for your classes:

    class mailchimpSF_Widget extends WP_Widget {
    //	function mailchimpSF_Widget() {
    	function __construct() {

    WordPress already uses this format throughout the codebase, so it’s a safe bet. PHP7 is going to skyrocket in popularity soon so please fix this ASAP to avoid it being a hassle for other users. The deprecation notice shows/is-generated on all pages across the site, so it’s extremely noisy.


Viewing 1 replies (of 1 total)
  • Plugin Author mcsupport


    Hey there,

    Thanks for passing that along – we will take a look into this.



Viewing 1 replies (of 1 total)
  • The topic ‘PHP7 Compatibility EASY FIX use __construct()’ is closed to new replies.