Skip to content

Commit 79f392c

Browse files
MAGETWO-60351: Unnecessary disabled payment methods on checkout page #4868
1 parent a062940 commit 79f392c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

app/code/Magento/Payment/Plugin/PaymentConfigurationProcess.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function beforeProcess(\Magento\Checkout\Block\Checkout\LayoutProcessor $
5353

5454
$storeId = $this->storeManager->getStore()->getId();
5555
$activePaymentMethodList = $this->paymentMethodList->getActiveList($storeId);
56-
$getCodeFunc = function($method) {
56+
$getCodeFunc = function ($method) {
5757
return $method->getCode();
5858
};
5959
$activePaymentMethodCodes = array_map($getCodeFunc, $activePaymentMethodList);

app/code/Magento/Vault/Plugin/PaymentVaultConfigurationProcess.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,20 @@ public function beforeProcess(\Magento\Checkout\Block\Checkout\LayoutProcessor $
6262
$storeId = $this->storeManager->getStore()->getId();
6363
$activePaymentMethodList = $this->paymentMethodList->getActiveList($storeId);
6464
$activeVaultList = $this->vaultPaymentList->getActiveList($storeId);
65-
$getCodeFunc = function($method) {
65+
$getCodeFunc = function ($method) {
6666
return $method->getCode();
6767
};
68-
$getProviderCodeFunc = function($method) {
68+
$getProviderCodeFunc = function ($method) {
6969
return $method->getProviderCode();
7070
};
7171
$activePaymentMethodCodes = array_map($getCodeFunc, $activePaymentMethodList);
7272
$activeVaultCodes = array_map($getCodeFunc, $activeVaultList);
7373
$activeVaultProviderCodes = array_map($getProviderCodeFunc, $activeVaultList);
74-
$activePaymentMethodCodes = array_merge($activePaymentMethodCodes, $activeVaultCodes, $activeVaultProviderCodes);
74+
$activePaymentMethodCodes = array_merge(
75+
$activePaymentMethodCodes,
76+
$activeVaultCodes,
77+
$activeVaultProviderCodes
78+
);
7579

7680
foreach ($configuration as $paymentGroup => $groupConfig) {
7781
foreach (array_keys($groupConfig['methods']) as $paymentCode) {

0 commit comments

Comments
 (0)