PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/fields/FrmFieldCreditCard.php +4 -9 6.26 → trunk View file →
@@ -26,15 +26,14 @@
26 26 /**
27 27 * @return array
28 28 */
29 29 protected function field_settings_for_type() {
30 - $settings = array(
30 + return array(
31 31 'clear_on_focus' => false,
32 32 'description' => false,
33 33 'default' => false,
34 34 'required' => false,
35 35 );
36 - return $settings;
37 36 }
38 37
39 38 protected function include_form_builder_file() {
40 39 return FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/field-credit-card.php';
@@ -54,11 +53,10 @@
54 53 );
55 54
56 55 ob_start();
57 56
58 - if ( FrmAppHelper::is_style_editor_page() ) {
59 - // The styler preview doesn't load the Stripe scripts.
60 - // We need to use the form builder view instead.
57 + if ( FrmAppHelper::is_style_editor_page() || FrmFormsHelper::is_block_or_page_builder_preview() ) {
58 + // Payment gateway scripts are unavailable in preview contexts, use the builder placeholder.
61 59 $field = $this->field;
62 60 include $this->include_form_builder_file();
63 61 } else {
64 62 FrmStrpLiteActionsController::show_card( $this->field, $args['field_name'], $pass_args );
@@ -63,10 +61,7 @@
63 61 } else {
64 62 FrmStrpLiteActionsController::show_card( $this->field, $args['field_name'], $pass_args );
65 63 }
66 64
67 - $input_html = ob_get_contents();
68 - ob_end_clean();
69 -
70 - return $input_html;
65 + return ob_get_clean();
71 66 }
72 67 }