Skip to content

Commit 7dbb667

Browse files
committed
gw-cache-buster.php: Fixed GPMPN compatibility issue where custom starting page is not applied.
1 parent 7d2ea71 commit 7dbb667

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gravity-forms/gw-cache-buster.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,14 @@ public function ajax_get_form() {
301301
return rgar( $_REQUEST, 'form_theme' ) ?: $slug;
302302
}, 10, 2 );
303303

304+
add_filter( 'gpmpn_default_page_' . $form_id, function( $page ) {
305+
if ( rgars( $_REQUEST, 'atts/page' ) && rgget( 'gpmpn_page' ) ) {
306+
return rgget( 'gpmpn_page' );
307+
}
308+
309+
return rgars( $_REQUEST, 'atts/page', $page );
310+
} );
311+
304312
$atts = rgpost( 'atts' );
305313

306314
// GF expects an associative array for field values. Parse them before passing it on.

0 commit comments

Comments
 (0)