Skip to content

Commit

Permalink
Improve the detection of GF form submission
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcasual committed Sep 19, 2024
1 parent e6074dd commit c40cf9a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ private function process_duplicate_entry() {
public function process_gravity_forms_form_submission( $response ) {
$rest_endpoint = $this->get_rest_endpoint_from_request();

if ( 1 === (int) ( $_REQUEST['gform_submit'] ?? 0 ) && $rest_endpoint ) {
if ( array_key_exists( 'gform_submit', $_REQUEST ) && $rest_endpoint ) {
header( 'Content-Type: text/html' );
}

Expand Down

0 comments on commit c40cf9a

Please sign in to comment.