PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / trunk
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder vtrunk
6.2.15 6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 All 197 releases
← All changes | app/Modules/Payments/PaymentMethods/Stripe/Components/StripeInline.php +5 -1 6.2.5 → trunk View file →
@@ -2,8 +2,9 @@
2 2
3 3 namespace FluentForm\App\Modules\Payments\PaymentMethods\Stripe\Components;
4 4
5 5 use FluentForm\Framework\Helpers\ArrayHelper;
6 +use FluentForm\App\Modules\Payments\PaymentHelper;
6 7 use FluentForm\App\Services\FormBuilder\BaseFieldManager;
7 8 use FluentForm\App\Modules\Payments\PaymentMethods\Stripe\StripeSettings;
8 9
9 10 if (!defined('ABSPATH')) {
@@ -33,8 +34,10 @@
33 34 if (ArrayHelper::get($method, 'settings.embedded_checkout.value') !== 'yes') {
34 35 return $inlineContents;
35 36 }
36 37
38 + $paymentElement = PaymentHelper::isStripePaymentElement($method);
39 +
37 40 add_filter('fluentform/form_class', function ($classes, $targetForm) use ($form) {
38 41 if ($form->instance_index == $targetForm->instance_index) {
39 42 $classes .= ' ff_has_stripe_inline';
40 43 }
@@ -52,9 +55,10 @@
52 55 $markup .= '</div>';
53 56
54 57 $attributes = [
55 58 'name' => 'stripe_card_element',
56 - 'class' => 'ff_stripe_card_element ff-el-form-control',
59 + // The Payment Element draws its own inputs; only the bare Card Element needs the input box
60 + 'class' => $paymentElement ? 'ff_stripe_card_element' : 'ff_stripe_card_element ff-el-form-control',
57 61 'data-wpf_payment_method' => 'stripe',
58 62 'id' => $elementId,
59 63 'data-checkout_style' => 'embedded_form',
60 64 'data-verify_zip' => ArrayHelper::get($method, 'settings.verify_zip.value') === 'yes'