Skip to content

Commit da1173a

Browse files
authored
Merge pull request magento#3660 from magento-epam/EPAM-PR-32
[epam] MAGETWO-96432: [2.3.x] Payment method title does not update in the admin sales order grid
2 parents 349ad46 + 6520e50 commit da1173a

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

app/code/Magento/Payment/Helper/Data.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public function __construct(
8484
}
8585

8686
/**
87+
* Get config name of method model
88+
*
8789
* @param string $code
8890
* @return string
8991
*/
@@ -259,10 +261,13 @@ public function getPaymentMethodList($sorted = true, $asLabelValue = false, $wit
259261
$groupRelations = [];
260262

261263
foreach ($this->getPaymentMethods() as $code => $data) {
262-
if (isset($data['title'])) {
263-
$methods[$code] = $data['title'];
264-
} else {
265-
$methods[$code] = $this->getMethodInstance($code)->getConfigData('title', $store);
264+
if (!empty($data['active'])) {
265+
$storedTitle = $this->getMethodInstance($code)->getConfigData('title', $store);
266+
if (isset($storedTitle)) {
267+
$methods[$code] = $storedTitle;
268+
} elseif (isset($data['title'])) {
269+
$methods[$code] = $data['title'];
270+
}
266271
}
267272
if ($asLabelValue && $withGroups && isset($data['group'])) {
268273
$groupRelations[$code] = $data['group'];

app/code/Magento/Payment/Ui/Component/Listing/Column/Method/Options.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ class Options implements \Magento\Framework\Data\OptionSourceInterface
2525
*
2626
* @param \Magento\Payment\Helper\Data $paymentHelper
2727
*/
28-
public function __construct(\Magento\Payment\Helper\Data $paymentHelper)
29-
{
28+
public function __construct(
29+
\Magento\Payment\Helper\Data $paymentHelper
30+
) {
3031
$this->paymentHelper = $paymentHelper;
3132
}
3233

0 commit comments

Comments
 (0)