From fd40fc03772fcc960a6a49049085b2c3e2b558c3 Mon Sep 17 00:00:00 2001 From: Ruben Ramirez Date: Fri, 4 Apr 2025 02:38:59 -0500 Subject: [PATCH] More Stripe Troubleshooting --- functions.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 706c36b..c4aed93 100644 --- a/functions.php +++ b/functions.php @@ -232,8 +232,16 @@ add_action( 'wp_ajax_send_job_invite', 'quiztech_ajax_send_job_invite' ); */ function quiztech_handle_credit_purchase_submission() { // Only process if our action is set and we are on the frontend - if ( ! isset( $_POST['quiztech_action'] ) || $_POST['quiztech_action'] !== 'initiate_credit_purchase' || is_admin() ) { - log_to_file("Stripe - quiztech_action unset or is_admin"); + if ( ! isset( $_POST['quiztech_action'] ) ) { + log_to_file("Stripe - quiztech_action unset"); + return; + } + if ($_POST['quiztech_action'] !== 'initiate_credit_purchase') { + log_to_file("Stripe - invalid action"); + return; + } + if (is_admin()) { + log_to_file("Stripe - is_admin"); return; }