Hi @vincentdonker,
We had a similar problem. Did you try the solution posted here?
FYI, we are not using the Action Scheduler nor WP-DBManager plugins. Everything is working without them.
Cheers!
Hi @vincentdonker,
Thanks for reaching out. The error indicates that your theme or any of your plugins is not compatible with WordPress 5.5. You’ll need to find out the incompatible theme or plugin. Please make sure all of the plugins and your theme is updated, possibly they already have a fix. If that didn’t solve the issue, follow this troubleshooting guide.
Please note that the error isn’t related with database tables, Action Scheduler, and the procedures in the thread link you’ve posted.
I hope this helps!
Hello @sanzeeb3
Thanks for the quick reply. All themes and plugins are updated (I set auto-updates).
Additionally the notice below is displayed:
Trying to access array offset on value of type null in mysite.com/public_html/wp-content/plugins/woocommerce-sendinblue-newsletter-subscription/woocommerce-sendinblue.php on line 412
@jetxpert Thanks I will try your suggestion.
I’m getting the exact same error message as originally posted, (except I’m using SendGrid instead of Sendinblue). When I deactivate your plugin, my site is again able to send emails correctly without this error message.
@joshmyself,
Did you the solution posted here? You may have a plugin conflict and/or need to clean up your /wp-admin/options.php entries.
The solution provided will allow you to re-activate or reinstall the conflicting plugin, if any.
Cheers!
Hi @jetxpert,
I followed these steps as suggested, (although am using WooCommerce, so didn’t touch that):
- Deactivated and deleted current version of WP Mail SMTP (V2.3.1). Prior to deactivation, followed instructions to set option to uninstall plugin upon its removal.
- Open /wp-admin/options.php page on site.
- On that page find options with these names: schema-ActionScheduler_LoggerSchema, schema-ActionScheduler_StoreSchema, and action_scheduler_migration_status (if any, the last one may be missing)
- Remove their values (leave them empty), save the changes.
- Manually downloaded older version (WP MAIL SMTP V2.1.1.) Then installed and activated it.
- Updated it to latest version (V2.3.1)
- Test send email… Failed with same critical error.
- Deactivate WP MAIL SMTP
- Test send email… Success
- Now looking for new SMTP mail plugin suggestions…?
Hi @vincentdonker, @joshmyself
If you’re getting a fatal error when sending an email (original question) which is:
Fatal error: Cannot declare class PHPMailer \ PHPMailer \ SMTP, because the name is already in use
Please note that this isn’t an issue with Action Scheduler and you should not do the steps above.
The issue is any of your plugins or your theme is not compatible with WordPress 5.5. Please update all the plugins and your theme. If that didn’t help, follow this troubleshooting guide to find out the incompatible plugin/theme.
I hope this helps!
@sanzeeb3,
Agree, it’s imperative to check for a plugin conflict. Once the offending plugin(s) is identified, then the solution provided above will work.
@joshmyself,
The steps you provided above did not mention if you performed a plugin conflict check as suggested in the recommended solution. For example, is your Woo-commerce plugin up-to-date? Did you deactivate it to see if it’s the root cause of your issue? Did you clean your wp_options DB table? In short, it doesn’t look like you performed Steps (1), (3), and (4) of the suggested solution. Can you try that again?
Cheers!
@sanzeeb3 Thanks voor the reply.
Updating All Plugins/themes did not resolve the issue. Testing by turning off/on plugins one-by-one partially resolves the issue. I also tried uninstalling (including deleting settings) the WP-Mail SMTP plugin.
When disabling the WP-Mail-SMTP plugin, some Woocommerce transactional e-mails work again (order sent), though other transactional e-mail still don’t work (new order/processing order).
The e-mails that are sent to my admin e-mail from the contact form (WPForms) on my site does work.
The newsletter subscription confirmation mail does not work.
When doing an e-mail test in the WP-Mail-SMTP plugin I still get the critical error. On another WordPress site that is using the same plugins, I do not get the critical error.
I am not sure how to further troubleshoot.
@sanzeeb3 and @jetxpert thanks, I should have clarified those details for you, I’m running WordPress 5.5.1, on PHP 7.4, and using default theme TwentyTwenty, with all plugins deactivated except for WP Mail SMTP 2.3.1, and I still get that critical error when sending a test email.
I just realised I should probably post my questions in its own thread, sorry @vincentdonker I didn’t mean to hijack your thread!
Hi @vincentdonker,
it looks like the WooCommerce – Sendinblue Add-on is causing the issue. They are requiring the old class-phpmailer.php and class-smtp.php files and that is causing the issue.
Their plugin is not compatible with WP 5.5, so it would be best if you contacted their support for help. They should update their plugin with WP 5.5 PHPMailer changes…
Please try to deactivate that plugin and test out if our plugin started working again. It could be that another plugin is causing the same issue as well.
Take care!
Hi @joshmyself,
you are getting this PHP error?
Fatal error: Cannot declare class PHPMailer \ PHPMailer \ SMTP, because the name is already in use in /mysite.com/public_html/wp-includes/PHPMailer/SMTP.php on line 30
With no other plugins active on a default (no modifications) Twenty Twenty theme?
Where are you hosting your site?
Could you please also check the wp-config.php file on your server? is there any mention of smpt or phpmailer in it? I’ve seen some hosting companies modify the PHPMailer functionality in that file before.
Take care!
@capuderg Thanks you for the suggestion.
I deactivated the Sendinblue plugin and tried to send a test e-mail via WP-Mail-SMTP, I still got the critical error.
As I said, I have other WordPress sites with the same WordPress version, Theme and plugins and on those sites everything works fine. The only difference with the site that has issues is that the Woocommerce plugin is installed.
I will try to deactivate plugins one by one to see if one is incompatible with WP-Mail-SMTP.
Hi @vincentdonker,
could you please try to deactivate all plugins, except for the WP Mail SMTP, then try to send an email and see if it still fails?
If it doesn’t you can enabled the plugins back one by one and see which ones cause the issue.
Take care!
Maybe it is good to mention: I only get the critical error message when trying to send a test e-mail via the WP-Mail-SMTP plugin. I can then just navigate to the previous page in my browser and have acces to WP-Admin.
@capuderg I tried deactivating all plugins except for WPForms and WP-Mail-SMTP and I still could not sends a test e-mail via the plugin settings. Still getting the Critical Error message.
It says to check the admin e-mail for instructions, but no mail is sent to the admin e-mail.