Skip to content

Commit

Permalink
Merge pull request #1447 from zach-adams/fix/1446-gf-note-warnings
Browse files Browse the repository at this point in the history
Check if entry/lead ID is empty in "gform_post_note_added" action
  • Loading branch information
kasparsd authored Sep 13, 2023
2 parents 5aa2f73 + 697d155 commit aaf43ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions connectors/class-connector-gravityforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,11 @@ public function callback_gform_post_note_added( $note_id, $lead_id, $user_id, $u
unset( $note );
unset( $note_type );

// Skip if no entry/lead id (e.g. Save and Continue notifications)
if ( empty( $lead_id ) ) {
return;
}

$lead = \GFFormsModel::get_lead( $lead_id );
$form = $this->get_form( $lead['form_id'] );

Expand Down

0 comments on commit aaf43ea

Please sign in to comment.