Skip to content

Commit

Permalink
fix: recurrence create card only in subsequent
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiano-mallmann committed Nov 21, 2024
1 parent 13d95cc commit 1d0a521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 1d0a521

Please sign in to comment.