diff --git a/src/Gateways/StripeGateway.php b/src/Gateways/StripeGateway.php index 5648b01..347cd21 100644 --- a/src/Gateways/StripeGateway.php +++ b/src/Gateways/StripeGateway.php @@ -113,6 +113,7 @@ class StripeGateway { wp_safe_redirect( $session->url ); + exit; // If execution reaches here, exit() failed or was bypassed. $log_message_critical = "Quiztech StripeGateway: CRITICAL - Execution continued after wp_safe_redirect and before exit()."; if (function_exists('log_to_file')) { @@ -120,7 +121,6 @@ class StripeGateway { } else { error_log($log_message_critical); } - exit; } else { return new WP_Error( 'stripe_session_error', __( 'Could not create Stripe Checkout session.', 'quiztech' ) ); }