Skip to content

Commit 050aff9

Browse files
committed
MAGETWO-40006: Orders placed via Paypal are disappeared after disabling Magento_Paypal module
1 parent 5e8b706 commit 050aff9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

app/code/Magento/Sales/Ui/Component/Listing/Column/PaymentMethod.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,13 @@ public function prepareDataSource(array & $dataSource)
5050
{
5151
if (isset($dataSource['data']['items'])) {
5252
foreach ($dataSource['data']['items'] as & $item) {
53-
$item[$this->getData('name')] = $this->paymentHelper->getMethodInstance($item[$this->getData('name')])
54-
->getTitle();
53+
try {
54+
$item[$this->getData('name')] = $this->paymentHelper
55+
->getMethodInstance($item[$this->getData('name')])
56+
->getTitle();
57+
} catch (\UnexpectedValueException $exception) {
58+
//Displaying payment code (with no changes) if payment method is not available in system
59+
}
5560
}
5661
}
5762
}

0 commit comments

Comments
 (0)