From e0c49cca4f27c9ac94b0ad212d1eac6d61499a6e Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 19 Dec 2017 08:46:30 -0500 Subject: [PATCH] Fixed problem when session has a cart ID but the reg_request record doesn't exist. --- classes/regCartSupport.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/classes/regCartSupport.php b/classes/regCartSupport.php index fa61942..7a2aecc 100644 --- a/classes/regCartSupport.php +++ b/classes/regCartSupport.php @@ -334,15 +334,18 @@ class GlmRegCartSupport */ public function checkRegistrationRequest($requestId = false, $json = false, $noReturn = false) { - + + // echo "SESSION DATA:
".print_r($_SESSION,1).print_r($regRequest,1)."
"; + // Try to get the cart data $this->getRegistrationCart($requestId, false, true); $this->cart['blockCheckout'] = false; - // If cart status is false, then we don't have a cart so return now + // If cart status is false, then we don't have a cart so block checkout, clear cart ID, and return if (!$this->cart['status']) { $this->cart['blockCheckout'] = true; + $_SESSION['glm_reg_cart_id'] = false; return $this->cart; } @@ -736,8 +739,6 @@ class GlmRegCartSupport return false; } - // echo "
".print_r($_SESSION,1).print_r($regRequest,1)."
"; - // If there's a logged in registrations user (overrides any WordPress adminstrator or contact logins if (isset($_SESSION) && isset($_SESSION['LoginAccount']) && is_array($_SESSION['LoginAccount'])) { -- 2.17.1