Support » Plugin: Flexible Shipping for WooCommerce » Fatal Error for Woocommerce PayPal caused by Flexible Shipping

  • Resolved michme79


    Hi there. I’m hoping someone can help me. I’m getting a fatal error when I save changes to the PayPal payment method under woocommerce. The website still works with this error and the updates do save even though the error appears.

    I have deactivated all plugins and reactivated one by one and have narrowed it down to the flexible shipping for woocommerce plugin, but cannot work out what to do from here.

    Fatal error: Uncaught Error: Call to undefined method WPDesk\Logger\WC\WooCommerceMonologPlugin::clear() in /home3/bamstraw/public_html/wp-content/plugins/woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php:132 Stack trace: #0 /home3/bamstraw/public_html/wp-includes/class-wp-hook.php(286): WC_Gateway_Paypal->process_admin_options(”) #1 /home3/bamstraw/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array) #2 /home3/bamstraw/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /home3/bamstraw/public_html/wp-content/plugins/woocommerce/includes/admin/settings/class-wc-settings-payment-gateways.php(223): do_action(‘woocommerce_upd…’) #4 /home3/bamstraw/public_html/wp-includes/class-wp-hook.php(286): WC_Settings_Payment_Gateways->save(”) #5 /home3/bamstraw/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array) #6 /home3/bamstraw/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #7 /home3/bamstraw/public_html/wp-content/plu in /home3/bamstraw/public_html/wp-content/plugins/woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php on line 132

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor dyszczo


    Hi michme79,

    big thanks for precise info about an error.

    It looks like WC team has changed their approach to WC_Logger_Interface, and we have to think if using WC logging engine is still a good idea.

    For now to quickly patch the exception please add

    public function clear( $source = '' ) {}
    public function clear_expired_logs() {}

    to file located in flexible-shipping/vendor/wpdesk/wp-logs/src/WC/WooCommerceMonologPlugin.php in line 23 (after closing } of the constructor).

    Thank you so much for taking the time to review and provide a solution. This code has worked and there is no fatal error.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal Error for Woocommerce PayPal caused by Flexible Shipping’ is closed to new replies.