• Resolved westonworkshops

    (@westonworkshops)


    I upgraded our site to version 6.5.0 of the WooCommerce Stripe Payment Gateway and I immediately saw PHP Fatal errors being generated when the Checkout page tried to load. Disabling the plugin resolved the problem. Rollback to version 6.4.1 also restored normal functionality. The stack trace follows:

    [15-May-2025 14:25:34 UTC] PHP Fatal error:  Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object in /www/doc/www.mywave.cz/www/wp-includes/class-wp-hook.php:324
    Stack trace:
    #0 /www/doc/www.mywave.cz/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
    #1 /www/doc/www.mywave.cz/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #2 /www/doc/www.mywave.cz/www/wp-content/plugins/fusion-builder/shortcodes/woo-checkout-payment.php(233): do_action('awb_before_wooc...')
    #3 /www/doc/www.mywave.cz/www/wp-content/plugins/fusion-builder/shortcodes/woo-checkout-payment.php(207): FusionTB_Woo_Checkout_Payment->get_woo_checkout_payment_content()
    #4 /www/doc/www.mywave.cz/www/wp-includes/shortcodes.php(434): FusionTB_Woo_Checkout_Payment->render(Array, '', 'fusion_tb_woo_c...')
    #5 [internal function]: do_shortcode_tag(Array)
    #6 /www/doc/www.mywave.cz/www/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(fusion...', 'do_shortcode_ta...', '<div class="fus...')
    #7 /www/doc/www.mywave.cz/www/wp-content/plugins/fusion-builder/inc/class-fusion-column-element.php(588): do_shortcode('<div class="fus...')
    #8 /www/doc/www.mywave.cz/www/wp-includes/shortcodes.php(434): Fusion_Column_Element->render(Array, '[fusion_text co...', 'fusion_builder_...')
    #9 [internal function]: do_shortcode_tag(Array)
    #10 /www/doc/www.mywave.cz/www/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(fusion...', 'do_shortcode_ta...', '[fusion_builder...')
    #11 /www/doc/www.mywave.cz/www/wp-content/plugins/fusion-builder/inc/class-fusion-row-element.php(123): do_shortcode('[fusion_builder...')
    #12 /www/doc/www.mywave.cz/www/wp-includes/shortcodes.php(434): Fusion_Row_Element->render(Array, '[fusion_builder...', 'fusion_builder_...')
    #13 [internal function]: do_shortcode_tag(Array)
    #14 /www/doc/www.mywave.cz/www/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(fusion...', 'do_shortcode_ta...', '[fusion_builder...')
    #15 /www/doc/www.mywave.cz/www/wp-content/plugins/fusion-builder/shortcodes/fusion-container.php(1095): do_shortcode('[fusion_builder...')
    #16 /www/doc/www.mywave.cz/www/wp-includes/shortcodes.php(434): FusionSC_Container->render(Array, '[fusion_builder...', 'fusion_builder_...')
    #17 [internal function]: do_shortcode_tag(Array)
    #18 /www/doc/www.mywave.cz/www/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(fusion...', 'do_shortcode_ta...', '<div class="woo...')
    #19 /www/doc/www.mywave.cz/www/wp-includes/class-wp-hook.php(324): do_shortcode('<div class="woo...')
    #20 /www/doc/www.mywave.cz/www/wp-includes/plugin.php(205): WP_Hook->apply_filters('<div class="woo...', Array)
    #21 /www/doc/www.mywave.cz/www/wp-includes/post-template.php(256): apply_filters('the_content', '[fusion_builder...')
    #22 /www/doc/www.mywave.cz/www/wp-content/themes/Avada/100-width.php(23): the_content()
    #23 /www/doc/www.mywave.cz/www/wp-includes/template-loader.php(106): include('/www/doc/www.my...')
    #24 /www/doc/www.mywave.cz/www/wp-blog-header.php(19): require_once('/www/doc/www.my...')
    #25 /www/doc/www.mywave.cz/www/index.php(17): require('/www/doc/www.my...')
    #26 {main}
    thrown in /www/doc/www.mywave.cz/www/wp-includes/class-wp-hook.php on line 324

    The site is running WordPress 6.8.1 and WooCommerce 9.8.5.

    Thanks in advance for your support.

Viewing 11 replies - 1 through 11 (of 11 total)
  • annemirasol

    (@annemirasol)

    Hi @westonworkshops,

    From Line #2 of your attached stacktrace, it looks like the fatal is coming from a function hooked on awb_before_wooc...(action name got cut, but it should be the one inside FusionTB_Woo_Checkout_Payment->get_woo_checkout_payment_content() ). Can you check your custom code and let us know which method that is?

    Thread Starter westonworkshops

    (@westonworkshops)

    Here is the code that is being called:

    public function get_woo_checkout_payment_content() {
    $content = '';

    if ( ! is_object( WC()->cart ) || 0 === WC()->cart->get_cart_contents_count() ) {
    return $content;
    }

    if ( function_exists( 'woocommerce_checkout_payment' ) ) {
    ob_start();
    do_action( 'awb_before_woocommerce_checkout_payment' );
    woocommerce_checkout_payment();
    do_action( 'awb_after_woocommerce_checkout_payment' );
    $content .= ob_get_clean();
    }

    return apply_filters( 'fusion_woo_component_content', $content, $this->shortcode_handle, $this->args );
    }

    The hook being called at line 233 is ‘awb_before_woocommerce_checkout_payment‘. That is defined earlier in the module here:

    public function __construct() {
    parent::__construct( 'fusion_tb_woo_checkout_payment' );
    add_filter( 'fusion_attr_fusion_tb_woo_checkout_payment-shortcode', [ $this, 'attr' ] );

    // Ajax mechanism for live editor.
    add_action( 'wp_ajax_get_fusion_tb_woo_checkout_payment', [ $this, 'ajax_render' ] );

    if ( class_exists( 'WC_Stripe' ) ) {
    $stripe_payment_class = WC_Stripe::get_instance()->payment_request_configuration;
    add_action( 'woocommerce_review_order_before_submit', [ $stripe_payment_class, 'display_payment_request_button_html' ], 1 );
    add_action( 'woocommerce_review_order_before_submit', [ $stripe_payment_class, 'display_payment_request_button_separator_html' ], 2 );

    $stripe_express_checkout_class = WC_Stripe::get_instance()->express_checkout_configuration;
    add_action( 'awb_before_woocommerce_checkout_payment', [ $stripe_express_checkout_class, 'display_express_checkout_button_html' ], 1 );

    }

    if ( class_exists( 'WC_Payments' ) && ! is_admin() && ! fusion_doing_ajax() ) {
    add_action( 'wp', [ $this, 'catch_display_express_checkout_buttons' ] );
    }
    }

    Does that help?

    Kind regards

    Tim

    Mahfuzur Rahman

    (@mahfuzurwp)

    Thanks for sharing the system report and additional details, Robin, that’s really helpful.

    Based on what you’ve described, the issue appears to be related to a combination of custom code and functionality provided by a third-party theme (Avada). Since WooCommerce doesn’t include a built-in product carousel, and you’re also using a custom body class filter that may affect content visibility for certain user roles, this goes beyond what we can troubleshoot within our support scope.

    I’d recommend reaching out to the Avada theme support team, as they’ll be more familiar with how their carousel handles user roles and caching. If needed, consulting a developer may also help isolate and resolve the issue more efficiently.

    Thanks for understanding!

    Thread Starter westonworkshops

    (@westonworkshops)

    Hi,

    The comments you added above seem to refer to another thread…perhaps you can check what happened there.

    I did some further troubleshooting work by adding some null checking in the construct() function above to make it a bit more robust:

    public function __construct() {
    parent::__construct( 'fusion_tb_woo_checkout_payment' );
    add_filter( 'fusion_attr_fusion_tb_woo_checkout_payment-shortcode', [ $this, 'attr' ] );

    // Ajax mechanism for live editor.
    add_action( 'wp_ajax_get_fusion_tb_woo_checkout_payment', [ $this, 'ajax_render' ] );

    // Stripe Payment Request Buttons
    if ( class_exists( 'WC_Stripe' ) ) {
    $stripe = WC_Stripe::get_instance();

    // Fallback check for payment request configuration
    if ( isset( $stripe->payment_request_configuration ) ) {
    $stripe_payment_class = $stripe->payment_request_configuration;

    if ( method_exists( $stripe_payment_class, 'display_payment_request_button_html' ) ) {
    add_action( 'woocommerce_review_order_before_submit', [ $stripe_payment_class, 'display_payment_request_button_html' ], 1 );
    }

    if ( method_exists( $stripe_payment_class, 'display_payment_request_button_separator_html' ) ) {
    add_action( 'woocommerce_review_order_before_submit', [ $stripe_payment_class, 'display_payment_request_button_separator_html' ], 2 );
    }
    }

    // Fallback check for express checkout configuration
    if ( isset( $stripe->express_checkout_configuration ) ) {
    $stripe_express_checkout_class = $stripe->express_checkout_configuration;

    if ( method_exists( $stripe_express_checkout_class, 'display_express_checkout_button_html' ) ) {
    add_action( 'awb_before_woocommerce_checkout_payment', [ $stripe_express_checkout_class, 'display_express_checkout_button_html' ], 1 );
    }
    }

    }

    // WooCommerce Payments: fallback check
    if ( class_exists( 'WC_Payments' ) && ! is_admin() && function_exists( 'fusion_doing_ajax' ) && ! fusion_doing_ajax() ) {
    if ( method_exists( $this, 'catch_display_express_checkout_buttons' ) ) {
    add_action( 'wp', [ $this, 'catch_display_express_checkout_buttons' ] );
    }
    }
    }

    With that in place, the checkout page now loads without a problem BUT the express checkout buttons are not displayed because the isset( $stripe->express_checkout_configuration ) check is returning FALSE and the conditional code never runs. $stripe->express_checkout_configuration is presumably either undefined or NULL for some reason.

    Is $stripe->express_checkout_configuration still the correct way to get the express checkout configuration. Did something change between 6.4.1 and 6.5.x ?

    Cheers,

    Tim

    Thread Starter westonworkshops

    (@westonworkshops)

    This issue has been resolved by the release of a patch by the Avada developers.

    Hi @westonworkshops,

    Thank you for your feedback. The response from @mahfuzurwp is specifically meant for you. From your earlier request, it appears that some of the issues stem from customizations made directly to the Avada theme and its bundled Fusion Builder.

    To clarify, this forum is intended for discussing WooCommerce core issues. Since your request involves custom code and customizations, I recommend seeking assistance through the WooCommerce community channels, as this falls outside the scope of our support.

    Woo community: https://woocommerce.com/community-slack/ or raise it as an issue on github.

    Thread Starter westonworkshops

    (@westonworkshops)

    Hi Moses,

    Thank you for your message.

    The reason I said that the response from @mahfuzurwp was not for me was because:

    1. My name is not Robin.
    2. I have not submitted a status report.
    3. I am not using custom code.
    4. My issue has nothing to do with a product carousel and that was never mentioned in any of my posts in this thread.

    You state that this forum is intended for discussing WooCommerce core issues, but I am specifically posting here because my screen says this is the support forum for the ‘WooCommerce Stripe Payment Gateway‘. Where would you have me raise support issues for that plugin if not here? Is it possible that this thread is popping up in some different place in your systems?

    Clearly, the problem I observed could have been caused by the updated version of the plugin or as a result of a compatibility issue with another plugin. In this case it turned out to be the latter, and a patch for the Fusion Builder plugin was needed to restore proper functioning.

    Happily, the problem is resolved and the discussion in the thread remains to inform others.

    Kind regards,

    Tim

    Mahfuzur Rahman

    (@mahfuzurwp)

    Hi @westonworkshops,

    I’m sorry for the misunderstanding! Yes, you are correct. That response was meant for another thread, but I’m not sure how it got sent here. Maybe my brain was not thinking!

    Mahfuzur Rahman

    (@mahfuzurwp)

    Hi @westonworkshops,

    Thanks for sharing all the details, this is super helpful.

    Based on the error and the code you shared, it looks like the issue is happening because the express_checkout_configuration property expected by your code is returning null. This causes the callback registered on the awb_before_woocommerce_checkout_payment hook to be invalid, leading to the fatal error you’re seeing.

    Also, I noticed you’re using version 6.5.0 of the WooCommerce Stripe Payment Gateway plugin. The current version is 9.5.1, which includes many improvements and bug fixes. Could you let us know why that older version is in use? We recommend updating to the latest version to ensure compatibility and stability.

    Please let us know if the issue persists after updating!

    Thread Starter westonworkshops

    (@westonworkshops)

    Hi Mahfuzur,

    Thanks for clarifying. As you see from above the issue was solved by a Fusion Builder patch. All is good now.

    My reference to 6.5.0 should have read 9.5.0 – my brain clearly not working at that time either. Anyway all is good – thanks for the support.

    Cheers,

    Tim

    Jonayed (woo-hc)

    (@jonayedhosen)

    Hi @westonworkshops ,

    Thanks so much for the update!

    I’m really glad to hear that the Fusion Builder patch did the trick and the issue is now resolved. That’s great news!

    However, If you have a moment, we’d really appreciate it if you could share your experience by leaving us a review: https://ww.wp.xz.cn/support/plugin/woocommerce-gateway-stripe/reviews/#new-post. Your feedback helps us keep improving!

    Please don’t hesitate to create a new topic if you need further assistance.

    Cheers!

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

The topic ‘PHP Fatal Error with 9.5.0’ is closed to new replies.