Fatal Error undefined method WC_Order::get_id()
-
Hi
If anyone can help please.
After a call to stripe to process a card payment the screen is displaying the “There has been a critical error on this website” message. The payment is accepted, the order status is left at ‘pending’. All processing is stopped at this point. This is occurring at irregular intervals; not with every order.
The log is showing:
[11-Apr-2022 23:27:14 UTC] PHP Fatal error: Uncaught Error: Call to undefined method WC_Order::get_id() in /home//public_html/donate/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php:981
The script class-wc-gateway-stripe.php at line 981 is
// A webhook might have modified or locked the order while the intent was retreived. This ensures we are reading the right status.
***** clean_post_cache( $order->get_id() ); ******** LINE 981 ************
$order = wc_get_order( $order->get_id() );There is a comment in the script which i am not sure what it means:
* @since 4.2.0
* @param WC_Order $order The order which is in a transitional state.Any help much appreciated
Annie
The topic ‘Fatal Error undefined method WC_Order::get_id()’ is closed to new replies.