PHP Fatal error: Uncaught Error: Class “WC_Settings_Page” not found
-
Hello,
We recently started getting the following fatal error originating from this plugin:
[2024-03-25T16:17:37.468715+00:00] PHP Fatal error: Uncaught Error: Class “WC_Settings_Page” not found in /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/settings-page.php:13#012Stack trace:#012#0 /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/autoloader.php(62): require()#012#1 /nas/content/live/mwprodsupply/wp-includes/plugin.php(121): Woo_MP\Autoloader->autoload(‘Woo_MP\\Settings…’)#012#2 /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/woo-mp.php(52): add_filter(‘woocommerce_get…’, Array)#012#3 /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/woo-mp.php(22): Woo_MP\Woo_MP->init_hooks()#012#4 /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/bootstrap.php(17): Woo_MP\Woo_MP->init()#012#5 /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/woo-mp.php(47): require(‘/nas/content/li…’)#012#6 /nas/content/live/mwprodsupply/wp-settings.php(473): include_once(‘/nas/content/li…’)#012#7 /nas/content/live/mwprodsupply/wp-config.php(122): require_once(‘/nas/content/li…’)#012#8 /nas/content/live/mwprodsupply/wp-load.php(50): require_once(‘/nas/content/li…’)#012#9 /nas/content/live/mwprodsupply/wp-admin/admin-ajax.php(22): require_once(‘/nas/content/li…’)#012#10 {main}#012 thrown in /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/settings-page.php on line 13
It must be a recent WooCommerce or WordPress version that’s causing this as the plugin had been working great for years. I temporarily fixed it by adding a class_exists( ‘WC_Settings_Page’ ) conditional around the add_filter on line 52 in the woo-mp/includes/woo-mp.php file. This, of course, seems to disable the settings page but the fatal error goes away and everything else seems to work.
Thank you!
- The topic ‘PHP Fatal error: Uncaught Error: Class “WC_Settings_Page” not found’ is closed to new replies.