Added additional debugging for Stripe Checkout
This commit is contained in:
parent
4e09966bba
commit
20fdf3e3b4
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue