Skip to content

Commit

Permalink
Fix error savings forms in Gravity Forms v2.5-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
jakejackson1 committed Feb 23, 2024
1 parent c069c6e commit b7d7483
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ Gravity PDF can be run on most modern shared web hosting without any issues. It

== Changelog ==

= 6.8.1 =
* Bug: Fix Form Editor saving problem for old versions of Gravity Forms (v2.5 to 2.6)

= 6.8.0 =
* Feature: Add PDF Download metabox to Gravity Flow Inbox for logged-in users with appropriate capability
* Feature: Add AI-generated translations for French, Spanish, Italian, German, Dutch, Russian, and Chinese
Expand Down
7 changes: 2 additions & 5 deletions src/Controller/Controller_Form_Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,8 @@ public function clear_cached_pdf_settings( $form, $form_id, $meta_name ) {
return $form;
}

if ( method_exists( '\GFFormsModel', 'flush_current_form' ) ) {
\GFFormsModel::flush_current_form( \GFFormsModel::get_form_cache_key( $form_id ) );
} else {
\GFFormsModel::flush_current_forms();
}
/* In the unlikely event the PDFs have been updated since the execution cycle begun, clear the form cache */
\GFFormsModel::flush_current_forms();

$updated_form = $this->gform->get_form( $form_id );
$form['gfpdf_form_settings'] = $updated_form['gfpdf_form_settings'] ?? [];
Expand Down

0 comments on commit b7d7483

Please sign in to comment.