Title: Critical error after plugin update
Last modified: June 6, 2021

---

# Critical error after plugin update

 *  Resolved [wpkiller](https://wordpress.org/support/users/wpkiller/)
 * (@wpkiller)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/)
 * Hi There,
 * Just ran a plugins upgrade on my site and got a critical error where both site
   and admin panel weren’t reachable. Following the below error message send to 
   my email, I’ve renamed action-scheduler’s folder and the site is working again.
 * Any idea?
 * > An error of type E_ERROR was caused in line 10 of the file /xxx/xxx/public_html/
   > wp-content/plugins/action-scheduler/classes/abstracts/ActionScheduler.php. 
   > Error message: Cannot declare class ActionScheduler, because the name is already
   > in use

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

 *  Plugin Support [Thu P. a11n](https://wordpress.org/support/users/thup90/)
 * (@thup90)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14525214)
 * 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.
 *  [trisky](https://wordpress.org/support/users/trisky/)
 * (@trisky)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14527675)
 * 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/](https://actionscheduler.org/faq/)
    -  This reply was modified 5 years ago by [trisky](https://wordpress.org/support/users/trisky/).
      Reason: plugin name added
    -  This reply was modified 5 years ago by [trisky](https://wordpress.org/support/users/trisky/).
      Reason: formatting
 *  Thread Starter [wpkiller](https://wordpress.org/support/users/wpkiller/)
 * (@wpkiller)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14527934)
 * [@thup90](https://wordpress.org/support/users/thup90/) sorry but I don’t have
   Woocommerce installed on that site.
 *  Plugin Contributor [crstauf](https://wordpress.org/support/users/crstauf/)
 * (@crstauf)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14528654)
 * 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).
 *  Thread Starter [wpkiller](https://wordpress.org/support/users/wpkiller/)
 * (@wpkiller)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14528667)
 * [@crstauf](https://wordpress.org/support/users/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?
 *  [Antony Agnel](https://wordpress.org/support/users/itzmeanto/)
 * (@itzmeanto)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14529183)
 * I am also facing the same error – using WP Mail SMTP and Action Scheduler on 
   my site.
 *  Thread Starter [wpkiller](https://wordpress.org/support/users/wpkiller/)
 * (@wpkiller)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14532000)
 * 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.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14537465)
 * Thanks for letting us know!
 *  [trisky](https://wordpress.org/support/users/trisky/)
 * (@trisky)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14553935)
 * Hi there!
    [@wpkiller](https://wordpress.org/support/users/wpkiller/) do you 
   mind sharing which plugin did you use? I’m having the same issue.
 *  Thread Starter [wpkiller](https://wordpress.org/support/users/wpkiller/)
 * (@wpkiller)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14554181)
 * [@trisky](https://wordpress.org/support/users/trisky/) I believe it came with
   WP Mail SMTP.
 *  Plugin Contributor [crstauf](https://wordpress.org/support/users/crstauf/)
 * (@crstauf)
 * [5 years ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14564620)
 * 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](https://github.com/woocommerce/action-scheduler/pull/713#issuecomment-862557180)
 *  [trisky](https://wordpress.org/support/users/trisky/)
 * (@trisky)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14638288)
 * Solved in wp-mail-smtp 2.9.0
    [https://wordpress.org/plugins/wp-mail-smtp/#developers](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 🙂

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

The topic ‘Critical error after plugin update’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/action-scheduler.svg)
 * [Action Scheduler](https://wordpress.org/plugins/action-scheduler/)
 * [Support Threads](https://wordpress.org/support/plugin/action-scheduler/)
 * [Active Topics](https://wordpress.org/support/plugin/action-scheduler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/action-scheduler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/action-scheduler/reviews/)

## Tags

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

 * 12 replies
 * 6 participants
 * Last reply from: [trisky](https://wordpress.org/support/users/trisky/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/critical-error-after-plugin-update-4/#post-14638288)
 * Status: resolved