From 4825647a1c8f0ef715857ec1f8211c02bf3278a9 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Fri, 19 Jun 2026 10:32:31 -0300 Subject: [PATCH] Add form builder check before loading stripe scripts --- stripe/controllers/FrmTransLiteActionsController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stripe/controllers/FrmTransLiteActionsController.php b/stripe/controllers/FrmTransLiteActionsController.php index 8632ebbf66..55a2d0d656 100755 --- a/stripe/controllers/FrmTransLiteActionsController.php +++ b/stripe/controllers/FrmTransLiteActionsController.php @@ -473,6 +473,12 @@ public static function hide_gateway_field_on_front_end( $values, $field ) { return $values; } + if ( FrmAppHelper::is_form_builder_page() ) { + // The hooks this uses can get called in the form builder and settings pages. + // But we do not need the script in this case. + return $values; + } + // This is also called from the frm_enqueue_form_scripts hook. // With this here, the value of frm_stripe_vars.settings[0].fields is -1 // This is because the amount value is processed and a shortcode is not found in '000'.