Hi there!
Could you share your System Status Report, it would help us to understand your site setup a bit better. You can find it via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, paste it here in your reply.
Hi there! I’m having the same problem.
It seems that the class was already in use by an other plugin: wp-mail-smtp
wp plugin list
PHP Fatal error: Cannot declare class ActionScheduler, because the name is already in use in /www/web/app/plugins/action-scheduler/classes/abstracts/ActionScheduler.php on line 10
With actionScheduler disabled:
wp shell
wp> ActionScheduler::class
=> string(15) “ActionScheduler”
wp> (new \ReflectionClass(‘ActionScheduler’))->getFileName();
=> string(116) “/www/web/app/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php”
Shouldn’t action scheduler check if it’s already installed since it’s supposed to be used by “other plugins”?
According to the FAQs thats what actionscheduler should do but it seems it’s not doing so?
https://actionscheduler.org/faq/
-
This reply was modified 2 years, 10 months ago by trisky. Reason: plugin name added
-
This reply was modified 2 years, 10 months ago by trisky. Reason: formatting
@thup90 sorry but I don’t have Woocommerce installed on that site.
This sounds like Action Scheduler library is being loaded incorrectly, so the magic of loading only once from multiple sources is being skipped. An investigation on how wp-mail-smtp loads Action Scheduler would confirm or discard that theory (unless there’s another plugin loading AS).
@crstauf thanks. I wasn’t even aware wp-mail-smtp installed this plugin.
Actually yesterday after struggling with wp-mail-smtp for a few hours getting errors from it, I’ve removed it and replaced with another smtp plugin which actually works.
So, can I safely remove Action Scheduler now?
I am also facing the same error – using WP Mail SMTP and Action Scheduler on my site.
As we weren’t really getting answers here, I’ve replaced WP Mail SMTP plugin to another one which is working, and removed Action Scheduler altogether which was already disabled the last days.
Everything seems to be working fine till now.
Plugin Support
Hannah S.L.
(@fernashes)
Automattic Happiness Engineer
Thanks for letting us know!
Hi there!
@wpkiller do you mind sharing which plugin did you use? I’m having the same issue.
@trisky I believe it came with WP Mail SMTP.
This could be relevant:
the problem happens when the test plugin includes 3.1.6 (but doesn’t occur with 3.2.0). We’ll check into this; it could be catching out other plugin combinations (including things like WooCommerce plus WooCommerce Subscriptions, depending on the respective versions).
https://github.com/woocommerce/action-scheduler/pull/713#issuecomment-862557180
Solved in wp-mail-smtp 2.9.0
https://wordpress.org/plugins/wp-mail-smtp/#developers
2.9.0 – 2021-06-24
....
Fixed: Action Scheduler library loading issue.
Upgrading wp-mail-smtp fixes the issue 🙂