Gform_after_submission No Longer Activating for Stripe-Integrated Form

It appears that without any modifications to the functions.php file, the gform_after_submission and gform_after_submission_1 actions have stopped triggering unexpectedly. The only potential factors could be updates to WordPress, Gravity Forms, Gravity Forms Stripe, or other plugins.

After a bunch of testing I noticed that removing the Stripe element from the form resulted in the successful triggering of gform_after_submission (as well as gform_after_submission_1).

Additional information:

  • When the form ajax attribute is set to “false” (or not set), the form confirmation page will open, but it will NOT trigger the gform_after_submission.
    • It also doesn’t trigger the notification email.
  • When the form ajax attribute is set to “true”, the form confirmation page will not open (stuck on spinner), but it WILL trigger gform_after_submission.
    • It does trigger the notification email

Site details:

  • PHP v7.4
  • Gravity Forms v2.8.2
  • GF Stripe v5.4.0

Code in functions.php

add_action('gform_after_submission', 'my_custom_function', 10, 2);

function my_custom_function($entry, $form)
{
    GFCommon::log_debug(__METHOD__ . '(): running.');

    error_log("my_custom_function() function ran from the FORM ID:" . $form['id'] . " at " . date("Y-m-d H:i:s") . "\n", 3, "./custom_error_log.txt");


    if ($form['id'] == 1) {
        error_log('Form ID 1 submission: ' . print_r($entry, true));
        error_log("my_custom_function() function ran at " . date("Y-m-d H:i:s") . "\n", 3, "./custom_error_log.txt");
    }
}

GF Debug Log

2024-01-29 19:57:17.921694 - DEBUG --> GFFormDisplay::validate(): Starting for form #1. 
2024-01-29 19:57:17.922056 - DEBUG --> GFFormDisplay::validate(): Executing functions hooked to gform_pre_validation. 
2024-01-29 19:57:17.922228 - DEBUG --> GFFormDisplay::validate(): Completed gform_pre_validation. 
2024-01-29 19:57:17.922445 - DEBUG --> GFFormDisplay::validate(): Checking restrictions. 
2024-01-29 19:57:17.922873 - DEBUG --> GFFormDisplay::validate(): Completed restrictions. Starting field validation. 
2024-01-29 19:57:17.923069 - DEBUG --> GFFormDisplay::validate_character_encoding(): Starting invalid characters validation for field: Name (1 - name) 
2024-01-29 19:57:17.925112 - DEBUG --> GFFormDisplay::validate_character_encoding(): gf_entry_meta meta_value charset = utf8mb4 
2024-01-29 19:57:17.925252 - DEBUG --> GFFormDisplay::validate_character_encoding(): reflecting methods 
2024-01-29 19:57:17.925419 - DEBUG --> GFFormDisplay::validate_character_encoding(): Completed in 0.002346 seconds. Value is valid ascii 
2024-01-29 19:57:17.925704 - DEBUG --> GFFormDisplay::validate_character_encoding(): Starting invalid characters validation for field: Mobile Number (6 - text) 
2024-01-29 19:57:17.925842 - DEBUG --> GFFormDisplay::validate_character_encoding(): Completed in 0.000136 seconds. Value is valid ascii 
2024-01-29 19:57:17.926884 - DEBUG --> GFFormDisplay::validate(): Field validation completed in 0.003874 seconds. 
2024-01-29 19:57:17.927023 - DEBUG --> GFFormDisplay::validate(): Executing functions hooked to gform_validation. 
2024-01-29 19:57:17.929162 - DEBUG --> GF_Query::query(): sql => SELECT SQL_CALC_FOUND_ROWS DISTINCT `t1`.`id` FROM `wp_gf_entry` AS `t1` LEFT JOIN `wp_gf_entry_meta` AS `m2` ON (`m2`.`entry_id` = `t1`.`id` AND `m2`.`meta_key` = 'gnd_token') WHERE (`t1`.`form_id` IN (1) AND (`m2`.`meta_key` = 'gnd_token' AND `m2`.`meta_value` = '20240129195709-4c50ddc8bad35d50945a5c9b3738edf34dbbaa02')) ORDER BY `t1`.`id` DESC LIMIT 20 
2024-01-29 19:57:17.931221 - DEBUG --> GFFormDisplay::validate(): Completed gform_validation. 
2024-01-29 19:57:17.932524 - DEBUG --> GFFormsModel::create_lead(): Draft entry created for form (#1) in 0.001170 seconds. 
2024-01-29 19:57:17.932679 - DEBUG --> GFCommon::is_spam_entry(): Executing functions hooked to gform_entry_is_spam. 
2024-01-29 19:57:17.932815 - DEBUG --> GFCommon::is_spam_entry(): Result from gform_entry_is_spam filter: false 
2024-01-29 19:57:17.932931 - DEBUG --> GFCommon::is_spam_entry(): Spam checks completed in 0.000276 seconds. Is submission considered spam? No. 
2024-01-29 19:57:17.934715 - DEBUG --> GFFormsModel::create_lead(): Draft entry created for form (#1) in 0.001180 seconds. 
2024-01-29 19:57:18.826396 - DEBUG --> GFFormsModel::create_lead(): Draft entry created for form (#1) in 0.003135 seconds. 
2024-01-29 19:57:21.132416 - DEBUG --> GFFormDisplay::process_form(): Starting to process form (#1) submission. 
2024-01-29 19:57:21.133394 - DEBUG --> GFFormDisplay::process_form(): Source page number: 1. Target page number: 0. 
2024-01-29 19:57:21.133569 - DEBUG --> GFFormDisplay::validate(): Starting for form #1. 
2024-01-29 19:57:21.133713 - DEBUG --> GFFormDisplay::validate(): Checking restrictions. 
2024-01-29 19:57:21.133960 - DEBUG --> GFFormDisplay::validate(): Completed restrictions. Starting field validation. 
2024-01-29 19:57:21.134210 - DEBUG --> GFFormDisplay::validate_character_encoding(): Starting invalid characters validation for field: Name (1 - name) 
2024-01-29 19:57:21.135727 - DEBUG --> GFFormDisplay::validate_character_encoding(): gf_entry_meta meta_value charset = utf8mb4 
2024-01-29 19:57:21.135910 - DEBUG --> GFFormDisplay::validate_character_encoding(): reflecting methods 
2024-01-29 19:57:21.136085 - DEBUG --> GFFormDisplay::validate_character_encoding(): Completed in 0.001869 seconds. Value is valid ascii 
2024-01-29 19:57:21.136524 - DEBUG --> GFFormDisplay::validate_character_encoding(): Starting invalid characters validation for field: Mobile Number (6 - text) 
2024-01-29 19:57:21.136660 - DEBUG --> GFFormDisplay::validate_character_encoding(): Completed in 0.000138 seconds. Value is valid ascii 
2024-01-29 19:57:21.137271 - DEBUG --> GFFormDisplay::validate(): Field validation completed in 0.003184 seconds. 
2024-01-29 19:57:21.137398 - DEBUG --> GFFormDisplay::validate(): Executing functions hooked to gform_validation. 
2024-01-29 19:57:21.138981 - DEBUG --> GFFormsModel::create_lead(): Draft entry created for form (#1) in 0.001408 seconds. 
2024-01-29 19:57:21.140655 - DEBUG --> GFCommon::is_spam_entry(): Executing functions hooked to gform_entry_is_spam. 
2024-01-29 19:57:21.141011 - DEBUG --> GFCommon::is_spam_entry(): Result from gform_entry_is_spam filter: false 
2024-01-29 19:57:21.141205 - DEBUG --> GFCommon::is_spam_entry(): Spam checks completed in 0.000692 seconds. Is submission considered spam? No. 
2024-01-29 19:57:21.958642 - DEBUG --> GFFormDisplay::validate(): Completed gform_validation. 
2024-01-29 19:57:21.959583 - DEBUG --> GFFormDisplay::process_form(): After validation. Is submission valid? No. 
2024-01-29 19:57:21.960062 - DEBUG --> GFFormDisplay::process_form(): Executing functions hooked to gform_post_process. 
2024-01-29 19:57:21.960633 - DEBUG --> GFFormDisplay::process_form(): Completed gform_post_process. 
2024-01-29 19:57:21.961390 - DEBUG --> GFFormDisplay::process_form(): Processing completed in 0.829678 seconds. 
2024-01-29 19:57:21.969808 - DEBUG --> GFFormDisplay::handle_confirmation(): Preparing confirmation (#5e758e25bf084 - Default Confirmation). 
2024-01-29 19:57:21.971005 - DEBUG --> GFFormDisplay::handle_confirmation(): Executing functions hooked to gform_confirmation. 
2024-01-29 19:57:21.971541 - DEBUG --> GFFormDisplay::handle_confirmation(): Completed gform_confirmation. 
2024-01-29 19:57:21.971661 - DEBUG --> GFFormDisplay::handle_confirmation(): Confirmation to be used => Array

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.