• Resolved Debesyla

    (@debesyla)


    Hey! Happens even with Storefront theme πŸ˜€ Log is while using Bricks theme:

    [10-Jun-2025 10:01:56 UTC] PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string + float in /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woo-stripe-payment/includes/abstract/abstract-wc-payment-gateway-stripe.php:1818
    Stack trace:
    #0 /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woo-stripe-payment/includes/abstract/abstract-wc-payment-gateway-stripe.php(1578): WC_Payment_Gateway_Stripe->get_formatted_shipping_methods()
    #1 /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woo-stripe-payment/includes/abstract/abstract-wc-payment-gateway-stripe.php(257): WC_Payment_Gateway_Stripe->output_display_items()
    #2 /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woocommerce/templates/checkout/payment-method.php(30): WC_Payment_Gateway_Stripe->payment_fields()
    #3 /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(346): include('/home/u92724685...')
    #4 /home/u927246858/domains/example.lt/public_html/wp-content/plugins/bricksultimate/includes/Elements/WooPaymentMethods.php(610): wc_get_template()
    #5 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/base.php(2633): BricksUltimate\Elements\WooPaymentMethods->render()
    #6 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/frontend.php(623): Bricks\Element->init()
    #7 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/container.php(968): Bricks\Frontend::render_element()
    #8 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/base.php(2633): Bricks\Element_Container->render()
    #9 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/frontend.php(623): Bricks\Element->init()
    #10 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/container.php(968): Bricks\Frontend::render_element()
    #11 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/base.php(2633): Bricks\Element_Container->render()
    #12 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/frontend.php(623): Bricks\Element->init()
    #13 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/container.php(968): Bricks\Frontend::render_element()
    #14 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/base.php(2633): Bricks\Element_Container->render()
    #15 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/frontend.php(623): Bricks\Element->init()
    #16 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/container.php(968): Bricks\Frontend::render_element()
    #17 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/base.php(2633): Bricks\Element_Container->render()
    #18 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/frontend.php(623): Bricks\Element->init()
    #19 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/container.php(968): Bricks\Frontend::render_element()
    #20 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/elements/base.php(2633): Bricks\Element_Container->render()
    #21 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/frontend.php(623): Bricks\Element->init()
    #22 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/frontend.php(758): Bricks\Frontend::render_element()
    #23 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/templates.php(265): Bricks\Frontend::render_data()
    #24 /home/u927246858/domains/example.lt/public_html/wp-includes/shortcodes.php(434): Bricks\Templates->render_shortcode()
    #25 [internal function]: do_shortcode_tag()
    #26 /home/u927246858/domains/example.lt/public_html/wp-includes/shortcodes.php(273): preg_replace_callback()
    #27 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/includes/woocommerce.php(1547): do_shortcode()
    #28 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/woocommerce/checkout/form-checkout.php(13): Bricks\Woocommerce::get_template_data_by_type()
    #29 /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(346): include('/home/u92724685...')
    #30 /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php(373): wc_get_template()
    #31 /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php(70): WC_Shortcode_Checkout::checkout()
    #32 /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(75): WC_Shortcode_Checkout::output()
    #33 /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(98): WC_Shortcodes::shortcode_wrapper()
    #34 /home/u927246858/domains/example.lt/public_html/wp-includes/shortcodes.php(434): WC_Shortcodes::checkout()
    #35 [internal function]: do_shortcode_tag()
    #36 /home/u927246858/domains/example.lt/public_html/wp-includes/shortcodes.php(273): preg_replace_callback()
    #37 /home/u927246858/domains/example.lt/public_html/wp-includes/class-wp-hook.php(324): do_shortcode()
    #38 /home/u927246858/domains/example.lt/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #39 /home/u927246858/domains/example.lt/public_html/wp-includes/post-template.php(256): apply_filters()
    #40 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/template-parts/page.php(11): the_content()
    #41 /home/u927246858/domains/example.lt/public_html/wp-includes/template.php(812): require('/home/u92724685...')
    #42 /home/u927246858/domains/example.lt/public_html/wp-includes/template.php(745): load_template()
    #43 /home/u927246858/domains/example.lt/public_html/wp-includes/general-template.php(206): locate_template()
    #44 /home/u927246858/domains/example.lt/public_html/wp-content/themes/bricks/page.php(12): get_template_part()
    #45 /home/u927246858/domains/example.lt/public_html/wp-includes/template-loader.php(106): include('/home/u92724685...')
    #46 /home/u927246858/domains/example.lt/public_html/wp-blog-header.php(19): require_once('/home/u92724685...')
    #47 /home/u927246858/domains/example.lt/public_html/index.php(17): require('/home/u92724685...')
    #48 {main}
    thrown in /home/u927246858/domains/example.lt/public_html/wp-content/plugins/woo-stripe-payment/includes/abstract/abstract-wc-payment-gateway-stripe.php on line 1818

    Basically once WooCommerce updated to 9.9.3, checkout page crashes while Stripe plugin is also active.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Clayton R

    (@mrclayton)

    Hi @debesyla

    Thanks for contacting us. We’re investigating if WooCommerce changed anything in this release related to the WC_Shipping_Rate class. The $cost property has always been a float value but now it seems to be a string in some instances.

    That or you have a 3rd party plugin that’s using the WooCommerce shipping rate filter to alter the operand type of the shipping cost.

    In either case, we’re going to add a cast to float in the next release in case of unexpected operand types.

    Kind Regards

    Plugin Author Clayton R

    (@mrclayton)

    @debesyla What version of PHP are you using?

    Also, this error shouldn’t occur if the string value is a legitimate numeric value. Do you have a way of finding out what the shipping rate cost property value is? I suspect it’s an invalid numeric string. Possible an empty string.

    Thanks

    • This reply was modified 6 months, 3 weeks ago by Clayton R.

    Hello

    We do confirm the bug, happens on PHP 8.1 and 8.3

    In our case, we use third party shipping plugin, (WooCommerce Advanced Shipping from sormano).

    I agree, with your solution, a variable casting will fix any potential issues.

    Plugin Author Clayton R

    (@mrclayton)

    @debesyla Version 3.3.88 is being released in 10 minutes.

    Thanks

    Plugin Author Clayton R

    (@mrclayton)

    Version 3.3.88 released.

    Thread Starter Debesyla

    (@debesyla)

    Thank you! I confirm it’s fixed! πŸŽ‰

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

The topic ‘Fatal error with WooCommerce 9.9.3’ is closed to new replies.