From f7d61a7aa1ac1354e1bb1e79bae131dc0ace3b9f Mon Sep 17 00:00:00 2001 From: Ninos Ego Date: Mon, 15 Feb 2016 16:11:04 +0100 Subject: [PATCH] Fixed: Notice in checkout (order received) with no existing order id -> undefined variable order --- includes/shortcodes/class-wc-shortcode-checkout.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/shortcodes/class-wc-shortcode-checkout.php b/includes/shortcodes/class-wc-shortcode-checkout.php index 1259c8e2d33..ac59a99ee20 100644 --- a/includes/shortcodes/class-wc-shortcode-checkout.php +++ b/includes/shortcodes/class-wc-shortcode-checkout.php @@ -198,8 +198,9 @@ class WC_Shortcode_Checkout { if ( $order_id > 0 ) { $order = wc_get_order( $order_id ); - if ( $order->order_key != $order_key ) - unset( $order ); + if ( $order->order_key != $order_key ) { + $order = false; + } } // Empty awaiting payment session