PHP Fatal error is thrown with invalid order number
-
With the Stripe Gateway plugin enabled, if I try to view an order receipt using an invalid order number with a valid key like this:
https://example.com/checkout/order-pay/899/?key=wc_order_xSaL2oqfnfRYU
a PHP Fatal error is thrown.
[01-Jun-2024 09:02:20 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_total() on false in /home/example/example.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-upe-payment-method.php:596
Stack trace: 0 /home/example/example.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-upe-payment-method.php(611): WC_Stripe_UPE_Payment_Method->get_current_order_amount() 1 /home/example/example.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-upe-payment-method.php(249): WC_Stripe_UPE_Payment_Method->is_inside_currency_limits(‘USD’) 2 /home/example/example.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-upe-payment-method.php(174): WC_Stripe_UPE_Payment_Method->is_enabled_at_checkout() 3 /home/example/example.com/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(324): WC_Stripe_UPE_Payment_Method->is_available() 4 /home/example/example.com/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(587): WC_Payment_Gateways->get_available_payment_gateways() 5 /home/example/example.com/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(315): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_button_wrapper_registrar() 6 /home/example/example.com/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(62): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_wrapper() 7 /home/example/example.com/wp-includes/class-wp-hook.php(324): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button{closure}(Object(WP)) 8 /home/example/example.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) 9 /home/example/example.com/wp-includes/plugin.php(565): WP_Hook->do_action(Array) 10 /home/example/example.com/wp-includes/class-wp.php(830): do_action_ref_array(‘wp’, Array) 11 /home/example/example.com/wp-includes/functions.php(1336): WP->main(”) 12 /home/example/example.com/wp-blog-header.php(16): wp() 13 /home/example/example.com/index.php(17): require(‘/home/tinyquick…’) 14 {main}
thrown in /home/example/example.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-upe-payment-method.php on line 596If the WooCommerce Stripe Gateway plugin is deactivated or the WooCommerce PayPal Payments plugin is deactivated, the error does not occur.
WooCommerce PayPal Payments plugin Version 2.7.1
WooCommerce Stripe Gateway plugin Version 8.3.1
WordPress 6.5.3 running Twenty Twenty-Four theme.Please Fix ??
- You must be logged in to reply to this topic.