diff --git a/functions.php b/functions.php index d21638d..a058505 100644 --- a/functions.php +++ b/functions.php @@ -225,6 +225,7 @@ 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"); return; } @@ -232,6 +233,7 @@ function quiztech_handle_credit_purchase_submission() { $manage_credits_page = get_page_by_path('manage-credits'); // Assumes page slug is 'manage-credits' if (!$manage_credits_page) { // Fallback or error if page doesn't exist + log_to_file("Stripe - manage credits page does not exist"); wp_die(esc_html__('Manage Credits page not found. Cannot process purchase.', 'quiztech')); exit; }