• Resolved rdsmes

    (@rdsmes)


    After upgrading our site to WP 5.4 the other day, I attempted to update the wp-mail-smtp plugin from version 1.4.2 to the current 1.9.0, using the ‘automatic’ WordPress plugin upgrade process.

    Wordpress told me it caught an error with the plugin, providing this information:

    WordPress version 5.4
    Current plugin: WP Mail SMTP (version 1.9.0)
    PHP version 7.2.24-0ubuntu0.18.04.3

    Error Details
    =============
    An error of type E_ERROR was caused in line 196 of the file /var/www/html/wp-content/plugins/wp-mail-smtp/src/Core.php. Error message: Uncaught Error: Class ‘WPMailSMTP\AM_Notification’ not found in /var/www/html/wp-content/plugins/wp-mail-smtp/src/Core.php:196

    Stack trace:
    #0 /var/www/html/wp-includes/class-wp-hook.php(287): WPMailSMTP\Core->init_notifications(”)
    #1 /var/www/html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(Object(WPMailSMTP\MailCatcher), Array)
    #2 /var/www/html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /var/www/html/wp-settings.php(409): do_action(‘plugins_loaded’)
    #4 /var/www/html/wp-config.php(99): require_once(‘/var/www/html/w…’)
    #5 /var/www/html/wp-load.php(37): require_once(‘/var/www/html/w…’)
    #6 /var/www/html/wp-admin/admin.php(34): require_once(‘/var/www/html/w…’)
    #7 /var/www/html/wp-admin/update.php(14): require_once(‘/var/www/html/w…’)
    #8 {main}
    thrown

    Just curious as to what may have caused this – I restored version 1.4.2, not knowing if the new version was actually going to work or not…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @rdsmes,

    This could be due to some kind of cache as this class has been removed from the version 1.7.0 and it is still looking for that class. If you have any cache, please reset it. Re-uploading the plugin might fix the issue as well, perhaps the plugin was not fully updated for you.

    I hope this helps!

    Thread Starter rdsmes

    (@rdsmes)

    Sanjeev,

    Thanks for the response. I had thought about maybe uploading the new version ‘by hand’ to resolve the problem, thinking, as you did, that the plugin hadn’t been updated correctly. At the time, I did not do that, however, as my priority was on getting the old version of the plugin reinstalled – and I was trying to do this over a very slow internet connection.

    I was surprised by the error, as I found it a bit difficult to believe that the code would have a ‘missing class’ error! Those types of errors wouldn’t be around for very long…

    Thanks again for the response – I will try the update again when I get a chance.

    Hi @rdsmes – No problem. Please let me know if you have any such issues in the future updates.

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

The topic ‘Class not found error on plugin upgrade’ is closed to new replies.