Skip to content

Commit

Permalink
Merge pull request #58 from buckaroo-it/BP-4162-Adjust-payment-fee-ti…
Browse files Browse the repository at this point in the history
…tle-to-default-for-improved-compatibility

BP-4162-Adjust-payment-fee-title-to-default-for-improved-compatibility
  • Loading branch information
vegimcarkaxhija authored Jan 30, 2025
2 parents 7435f19 + 1d7a71a commit 8f0164c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Block/Totals/Fee.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,14 @@ class Fee extends \Magento\Framework\View\Element\Template
{
protected PaymentFee $feeHelper;

protected SessionCheckout $sessionCheckout;

public function __construct(
Context $context,
array $data,
PaymentFee $feeHelper,
SessionCheckout $sessionCheckout
)
{
parent::__construct($context, $data);
$this->feeHelper = $feeHelper;
$this->sessionCheckout = $sessionCheckout;
}

/**
Expand All @@ -34,12 +30,9 @@ public function __construct(
public function getTitle(): string
{
try {
$payment = $this->sessionCheckout
->getQuote()
->getPayment();
return $this->feeHelper->getBuckarooPaymentFeeLabel($payment->getMethod());
return $this->feeHelper->getBuckarooPaymentFeeLabel();
} catch (\Throwable $th) {
return __('Payment Fee');
return 'Payment Fee';
}
}
}

0 comments on commit 8f0164c

Please sign in to comment.