• Resolved Josh Bergeron

    (@bergeronwoodgrains)


    There is a critical uncaught error seen in Woocommerce logs after installing the application. Here is the log file;

    2023-12-02T23:30:04+00:00 CRITICAL Uncaught Error: Call to a member function get_payment_method() on bool in /home/josh/public_html/wp-content/plugins/woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php:448

    Stack trace:

    #0 /home/josh/public_html/wp-includes/class-wp-hook.php(326): WC_Gateway_Paypal->capture_payment(1)

    #1 /home/josh/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)

    #2 /home/josh/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

    #3 /home/josh/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(395): do_action(‘woocommerce_ord…’, 1, Object(WC_Order))

    #4 /home/josh/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(253): WC_Order->status_transition()

    #5 /home/josh/public_html/wp-content/plugins/woocommerce-payments/includes/payment-methods/class-upe-payment-gateway.php(1177): WC_Order->save()

    #6 /home/josh/public_html/wp-includes/class-wp-hook.php(326): WCPay\Payment_Methods\UPE_Payment_Gateway->set_payment_method_title_for_email(Object(WC_Order), true, false)

    #7 /home/josh/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)

    #8 /home/josh/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

    #9 /home/josh/public_html/wp-content/plugins/kadence-woocommerce-email-designer/templates/woo/emails/email-order-details.php(142): do_action(‘woocommerce_ema…’, Object(WC_Order), true, false, Object(WC_Email_New_Order))

    #10 /home/josh/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/home/josh/publ…’)

    #11 /home/josh/public_html/wp-content/plugins/woocommerce/includes/class-wc-emails.php(421): wc_get_template(’emails/email-or…’, Array)

    #12 /home/josh/public_html/wp-includes/class-wp-hook.php(324): WC_Emails->order_details(Object(WC_Order), true, false, Object(WC_Email_New_Order))

    #13 /home/josh/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)

    #14 /home/josh/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

    #15 /home/josh/public_html/wp-content/themes/blocksy-child/woocommerce/emails/admin-new-order.php(35): do_action(‘woocommerce_ema…’, Object(WC_Order), true, false, Object(WC_Email_New_Order))

    #16 /home/josh/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/home/josh/publ…’)

    #17 /home/josh/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(364): wc_get_template(’emails/admin-ne…’, Array, ”, ”)

    #18 /home/josh/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email-new-order.php(134): wc_get_template_html(’emails/admin-ne…’, Array)

    #19 /home/josh/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(588): WC_Email_New_Order->get_content_html()

    #20 /home/josh/public_html/wp-content/plugins/kadence-woocommerce-email-designer/includes/class-kadence-woomail-preview.php(740): WC_Email->get_content()

    #21 /home/josh/public_html/wp-content/plugins/kadence-woocommerce-email-designer/includes/class-kadence-woomail-preview.php(780): Kadence_Woomail_Preview::get_preview_email()

    #22 /home/josh/public_html/wp-content/plugins/kadence-woocommerce-email-designer/preview.php(40): Kadence_Woomail_Preview::print_preview_email()

    #23 /home/josh/public_html/wp-content/plugins/kadence-woocommerce-email-designer/includes/class-kadence-woomail-preview.php(200): include(‘/home/josh/publ…’)

    #24 /home/josh/public_html/wp-includes/class-wp-hook.php(324): Kadence_Woomail_Preview->set_up_preview(Object(WP))

    #25 /home/josh/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)

    #26 /home/josh/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)

    #27 /home/josh/public_html/wp-includes/class-wp.php(418): do_action_ref_array(‘parse_request’, Array)

    #28 /home/josh/public_html/wp-includes/class-wp.php(813): WP->parse_request(”)

    #29 /home/josh/public_html/wp-includes/functions.php(1336): WP->main(”)

    #30 /home/josh/public_html/wp-blog-header.php(16): wp()

    #31 /home/josh/public_html/index.php(17): require(‘/home/josh/publ…’)

    #32 {main}

    thrown in /home/josh/public_html/wp-content/plugins/woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php on line 448

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Gilbert Hernandez

    (@ghernkadence)

    Hello @bergeronwoodgrains,

    The error stack trace you provided is triggered by WooCommerce. bergeronwoodgrains. Please follow the steps in Kadence’s troubleshooting article, including clearing your cache and checking for plugin conflicts.

    What steps did you take to trigger this error? Unfortunately, I can not reproduce the error, and it may be unique to your site.

    Plugin Author Ben Ritner – Kadence WP

    (@britner)

    Hey Josh, Most likely this error means you are previewing emails with a mockup order. And that the error would only occur while trying to preview/customize emails.

    Try changing your preview order to a real order on your site. That will fill the order object with all the third party data and should resolve.

    Ben

    Thread Starter Josh Bergeron

    (@bergeronwoodgrains)

    Thank you for the lightning fast response Gilbert and Ben. Ben you were right, as soon as I chose a real order from my website to preview, Woocommerce stopped shooting off critical error logs for the plugin. Thank you for this fix and for the plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Critical Uncaught Error After Installing Plugin’ is closed to new replies.