Title: Critical Error message when loading plugin
Last modified: February 28, 2023

---

# Critical Error message when loading plugin

 *  Resolved [ronniead](https://wordpress.org/support/users/ronniead/)
 * (@ronniead)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/critical-error-message-when-loading-plugin/)
 * When loading this plugin from the admin, I get the following error:
 * _There has been a critical error on this website._
 * I turned on debug in wp-config, and the page then threw this error:
 * > **Fatal error**: Uncaught TypeError: call_user_func_array(): Argument #1 ($
   > callback) must be a valid callback, non-static method QuadLayers\WCDC\Controller\
   > Premium::add_page() cannot be called statically in /home/790xxxx.cloudwaysapps.
   > com/dsfasfxp/public_html/wp-includes/class-wp-hook.php:308 Stack trace: #0 /
   > home/790xxxx.cloudwaysapps.com/dsfasfxp/public_html/wp-includes/class-wp-hook.
   > php(332): WP_Hook->apply_filters() #1 /home/790xxxx.cloudwaysapps.com/dsfasfxp/
   > public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #2 /home/790xxxx.
   > cloudwaysapps.com/dsfasfxp/public_html/wp-admin/admin.php(259): do_action()#
   > 3 {main} thrown in **/home/790xxxx.cloudwaysapps.com/dsfasfxp/public_html/wp-
   > includes/class-wp-hook.php** on line **308**
 * I’m not quite sure what to do. Can someone perhaps point me in the right direction?
 * Thank you so much!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcritical-error-message-when-loading-plugin%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [jmatiasmastro](https://wordpress.org/support/users/jmatiasmastro/)
 * (@jmatiasmastro)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/critical-error-message-when-loading-plugin/#post-16518124)
 * [@ronniead](https://wordpress.org/support/users/ronniead/)
 * Hi mate, could you tell us which version of our plugin you are using?
 * Regards.
 *  [noplanman](https://wordpress.org/support/users/noplanman/)
 * (@noplanman)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/critical-error-message-when-loading-plugin/#post-16519383)
 * I get the same error, using the latest version 3.0.3
 * Changing the `add_page` method at `lib/controller/class-premium.php:57` to `static`
   fixes it.
 *  Plugin Support [jmatiasmastro](https://wordpress.org/support/users/jmatiasmastro/)
 * (@jmatiasmastro)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/critical-error-message-when-loading-plugin/#post-16522078)
 * [@ronniead](https://wordpress.org/support/users/ronniead/) [@noplanman](https://wordpress.org/support/users/noplanman/)
 * Hello everyone, we have updated our plugin to a new version, could you install
   it and check if the issue persists?
 * Regards.
 *  Thread Starter [ronniead](https://wordpress.org/support/users/ronniead/)
 * (@ronniead)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/critical-error-message-when-loading-plugin/#post-16523063)
 * I can confirm the latest version has fixed this issue
 *  Plugin Author [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * (@quadlayers)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/critical-error-message-when-loading-plugin/#post-16528235)
 * thanks [@ronniead](https://wordpress.org/support/users/ronniead/)

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

The topic ‘Critical Error message when loading plugin’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-direct-checkout/assets/icon-256x256.jpg?rev=
   2911705)
 * [Direct Checkout for WooCommerce](https://wordpress.org/plugins/woocommerce-direct-checkout/)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-direct-checkout/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-direct-checkout/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-direct-checkout/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-direct-checkout/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/critical-error-message-when-loading-plugin/#post-16528235)
 * Status: resolved