• Hi, it appears that since a recent update (not sure if it’s Flexible Shipping or Woocommerce) the sites that use Flexible Shipping encounter a fatal error both on front and back-end:

    [03-Sep-2025 15:53:12 UTC] PHP Fatal error:  Uncaught Error: Class "WC_Shipping_Method" not found in /home/xxx/public_html/wp-content/plugins/flexible-shipping/classes/table-rate/flexible-shipping-settings.php:21
    Stack trace:
    #0 /home/xxx/public_html/wp-content/plugins/flexible-shipping/vendor/composer/ClassLoader.php(582): include()
    #1 /home/xxx/public_html/wp-content/plugins/flexible-shipping/vendor/composer/ClassLoader.php(433): Composer\Autoload\{closure}()
    #2 /home/xxx/public_html/wp-content/plugins/flexible-shipping/classes/class-flexible-shipping-plugin.php(341): Composer\Autoload\ClassLoader->loadClass()
    #3 /home/xxx/public_html/wp-content/plugins/flexible-shipping/classes/class-flexible-shipping-plugin.php(427): Flexible_Shipping_Plugin->load_dependencies()
    #4 /home/xxx/public_html/wp-content/plugins/flexible-shipping/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/BuilderTrait.php(66): Flexible_Shipping_Plugin->init()
    #5 /home/xxx/public_html/wp-content/plugins/flexible-shipping/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/Simple/SimpleFreeStrategy.php(51): FSVendor\WPDesk\Plugin\Flow\Initialization\Simple\SimpleFreeStrategy->init_plugin()
    #6 /home/xxx/public_html/wp-content/plugins/flexible-shipping/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/PluginBootstrap.php(83): FSVendor\WPDesk\Plugin\Flow\Initialization\Simple\SimpleFreeStrategy->run_init()
    #7 /home/xxx/public_html/wp-includes/class-wp-hook.php(324): FSVendor\WPDesk\Plugin\Flow\PluginBootstrap::FSVendor\WPDesk\Plugin\Flow\{closure}()
    #8 /home/xxx/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #9 /home/xxx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #10 /home/xxx/public_html/wp-settings.php(578): do_action()
    #11 /home/xxx/public_html/wp-config.php(72): require_once('/home/xxx/p...')
    #12 /home/xxx/public_html/wp-load.php(50): require_once('/home/xxx/p...')
    #13 /home/xxx/public_html/wp-blog-header.php(13): require_once('/home/xxx/p...')
    #14 /home/xxx/public_html/index.php(17): require('/home/xxx/p...')
    #15 {main}
    thrown in /home/xxx/public_html/wp-content/plugins/flexible-shipping/classes/table-rate/flexible-shipping-settings.php on line 21
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Grzegorz Rola

    (@grola)

    Hi, it might be an issue with the opcache. You can wait a moment until the opcache refreshes. Alternatively, try deactivating WooCommerce and then activating it again.

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Follow-up: turned out that the recent Woocommerce update somehow failed and disabled (even removed) the plugin. Without Woocommerce, Flexible Shipping causes this fatal error.

    So maybe an improvement request: first check for Woocommerce class existence before using it?

    In any case, problem solved. Sorry for bothering 🙂

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Alternatively, try deactivating WooCommerce and then activating it again.

    Yeah, the problem was that the complete back-end was inaccessible. Had to find out via FTP that the complete woocommerce dir was missing from /wp-content/plugins… not sure how that even happened.

    Plugin Support tograczyk

    (@tograczyk)

    So maybe an improvement request: first check for Woocommerce class existence before using it?

    Thanks for that suggestion! We’ll look into what we can do to protect the plugin from these types of errors. For now, I’m closing this thread, but we’ll revisit it once we have an update.

    Best regards,
    Tomek

    Plugin Support tograczyk

    (@tograczyk)

    Hi @ravanh , just a quick follow-up – we’ve released version 6.4.0 of the plugin, which addresses this issue.

    Thanks again for flagging it!

    Best regards,
    Tomek

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

The topic ‘Fatal error since update’ is closed to new replies.