From 1d0a521c8e46189688f104e522b6d8821a1205cc Mon Sep 17 00:00:00 2001 From: Fabiano Mallmann <25328512+fabiano-mallmann@users.noreply.github.com> Date: Thu, 21 Nov 2024 11:23:18 -0300 Subject: [PATCH] fix: recurrence create card only in subsequent --- src/Model/Checkout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Checkout.php b/src/Model/Checkout.php index 383711e1..0bdf1d1d 100644 --- a/src/Model/Checkout.php +++ b/src/Model/Checkout.php @@ -164,7 +164,7 @@ public function process(WC_Order $wc_order = null, string $type = CheckoutTypes: } private function formatFieldsWhenIsSubscription(&$fields, $wc_order) { - if(Subscription::hasSubscriptionProductInCart() == false){ + if(!Subscription::hasSubscriptionProductInCart() || Subscription::getRecurrenceCycle() != 'subsequent'){ return; } if ($fields['payment_method'] === 'credit_card') {