Skip to content

Commit 88d7dbc

Browse files
MC-41604: Settings migration in System configuration
- don't enable paylater durning upgrade
1 parent 970b47e commit 88d7dbc

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

app/code/Magento/Paypal/Setup/Patch/Data/UpdateBmltoPayLater.php

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,6 @@ public function apply()
8282
{
8383
$this->moduleDataSetup->getConnection()->startSetup();
8484

85-
$this->moduleDataSetup->getConnection()->insertOnDuplicate(
86-
$this->moduleDataSetup->getTable('core_config_data'),
87-
[
88-
'scope' => 'default',
89-
'scope_id' => 0,
90-
'path' => 'payment/paypal_paylater/experience_active',
91-
'value' => '1'
92-
]
93-
);
94-
9585
$select = $this->moduleDataSetup->getConnection()->select()
9686
->from(
9787
$this->moduleDataSetup->getTable('core_config_data'),
@@ -100,18 +90,13 @@ public function apply()
10090
->where('path LIKE ?', self::BMLPATH . '%');
10191
$bmlSettings = $this->moduleDataSetup->getConnection()->fetchPairs($select);
10292

103-
$enabled = false;
10493
foreach ($bmlSettings as $bmlPath => $bmlValue) {
10594
$setting = str_replace(self::BMLPATH, '', $bmlPath);
10695
$settingParts = explode('_', $setting);
10796
$page = $settingParts[0];
10897
$setting = $settingParts[1];
10998
$payLaterPath = self::PAYLATERPATH . $page;
11099

111-
if ($setting === 'display' && $bmlValue === '1') {
112-
$enabled = true;
113-
}
114-
115100
foreach ($this->bmlToPayLaterSettings as $bmlToPayLaterSetting) {
116101
if (in_array($page, $bmlToPayLaterSetting['pages'])
117102
&& array_key_exists($setting, $bmlToPayLaterSetting['data'])
@@ -155,17 +140,6 @@ public function apply()
155140
}
156141
}
157142
}
158-
if ($enabled) {
159-
$this->moduleDataSetup->getConnection()->insertOnDuplicate(
160-
$this->moduleDataSetup->getTable('core_config_data'),
161-
[
162-
'scope' => 'default',
163-
'scope_id' => 0,
164-
'path' => 'payment/paypal_paylater/enabled',
165-
'value' => '1'
166-
]
167-
);
168-
}
169143
return $this->moduleDataSetup->getConnection()->endSetup();
170144
}
171145

0 commit comments

Comments
 (0)