PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.16
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.16
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 +9 -10 6.336.16 View file →
@@ -10,9 +10,8 @@
10 10 class FrmFieldCreditCard extends FrmFieldType {
11 11
12 12 /**
13 13 * @var string
14 - *
15 14 * @since 3.0
16 15 */
17 16 protected $type = 'credit_card';
18 17
@@ -17,23 +16,20 @@
17 16 protected $type = 'credit_card';
18 17
19 18 /**
20 19 * @var bool
21 - *
22 20 * @since 3.0
23 21 */
24 22 protected $has_for_label = false;
25 23
26 - /**
27 - * @return array
28 - */
29 24 protected function field_settings_for_type() {
30 - return array(
25 + $settings = array(
31 26 'clear_on_focus' => false,
32 27 'description' => false,
33 28 'default' => false,
34 29 'required' => false,
35 30 );
31 + return $settings;
36 32 }
37 33
38 34 protected function include_form_builder_file() {
39 35 return FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/field-credit-card.php';
@@ -41,9 +37,8 @@
41 37
42 38 /**
43 39 * @param array $args
44 40 * @param array $shortcode_atts
45 - *
46 41 * @return string
47 42 */
48 43 public function front_field_input( $args, $shortcode_atts ) {
49 44 $pass_args = array(
@@ -53,10 +48,11 @@
53 48 );
54 49
55 50 ob_start();
56 51
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.
52 + if ( FrmAppHelper::is_style_editor_page() ) {
53 + // The styler preview doesn't load the Stripe scripts.
54 + // We need to use the form builder view instead.
59 55 $field = $this->field;
60 56 include $this->include_form_builder_file();
61 57 } else {
62 58 FrmStrpLiteActionsController::show_card( $this->field, $args['field_name'], $pass_args );
@@ -61,7 +57,10 @@
61 57 } else {
62 58 FrmStrpLiteActionsController::show_card( $this->field, $args['field_name'], $pass_args );
63 59 }
64 60
65 - return ob_get_clean();
61 + $input_html = ob_get_contents();
62 + ob_end_clean();
63 +
64 + return $input_html;
66 65 }
67 66 }