Skip to content

Commit 6a1c1f6

Browse files
committed
Merge remote-tracking branch 'origin/AC-1228' into gl_pr_paypal_nov11_2021
2 parents b3702e4 + 84db731 commit 6a1c1f6

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

app/code/Magento/Paypal/Block/PayLater/Banner.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Paypal\Model\PayLaterConfig;
1313
use Magento\Paypal\Model\SdkUrl;
1414
use Magento\Paypal\Model\Config as PaypalConfig;
15+
use Magento\Framework\App\ObjectManager;
1516

1617
/**
1718
* PayPal PayLater component block
@@ -56,14 +57,15 @@ public function __construct(
5657
PayLaterConfig $payLaterConfig,
5758
SdkUrl $sdkUrl,
5859
array $data = [],
59-
PaypalConfig $paypalConfig
60+
PaypalConfig $paypalConfig = null
6061
) {
6162
parent::__construct($context, $data);
6263
$this->payLaterConfig = $payLaterConfig;
6364
$this->sdkUrl = $sdkUrl;
6465
$this->placement = $data['placement'] ?? '';
6566
$this->position = $data['position'] ?? '';
66-
$this->paypalConfig = $paypalConfig;
67+
$this->paypalConfig = $paypalConfig ?: ObjectManager::getInstance()
68+
->get(PaypalConfig::class);
6769
}
6870

6971
/**

app/code/Magento/Paypal/Block/PayLater/LayoutProcessor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ public function __construct(
5454
}
5555

5656
/**
57-
* {@inheritdoc}
57+
* @inheritdoc
5858
*/
5959
public function process($jsLayout)
6060
{
6161
if (!$this->payLaterConfig->isEnabled(PayLaterConfig::CHECKOUT_PAYMENT_PLACEMENT)) {
6262
unset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']
63-
['children']['payment']['children']['payments-list']['children']['paypal-method-extra-content']['children']
64-
['paylater-place-order']);
63+
['children']['payment']['children']['payments-list']['children']['paypal-method-extra-content']
64+
['children']['paylater-place-order']);
6565

6666
return $jsLayout;
6767
}

0 commit comments

Comments
 (0)