Skip to content

Commit

Permalink
[ECP-8888] Update the condition and remove unnecessary cast
Browse files Browse the repository at this point in the history
  • Loading branch information
Can Demiralp committed Feb 18, 2025
1 parent 6d7a1a4 commit cb41e3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Helper/PaymentMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -1092,8 +1092,8 @@ public function isOpenInvoice(MethodInterface $paymentMethodInstance): bool
public function getRequiresLineItems(MethodInterface $paymentMethodInstance): bool
{
$isOpenInvoice = $this->isOpenInvoice($paymentMethodInstance);
$requiresLineItems = boolval($paymentMethodInstance->getConfigData(self::CONFIG_FIELD_REQUIRES_LINE_ITEMS));
$requiresLineItemsConfig = boolval($paymentMethodInstance->getConfigData(self::CONFIG_FIELD_REQUIRES_LINE_ITEMS));

return ($isOpenInvoice === true || $requiresLineItems === true);
return ($isOpenInvoice || $requiresLineItemsConfig);
}
}

0 comments on commit cb41e3f

Please sign in to comment.