Skip to content

Commit 548ea7b

Browse files
author
rani-webkul
committed
fixed disabled guest checkout issue in case of downloadable product #23971
1 parent cea3e79 commit 548ea7b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/code/Magento/Downloadable/Observer/IsAllowedGuestCheckoutObserver.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ class IsAllowedGuestCheckoutObserver implements ObserverInterface
1515
*/
1616
const XML_PATH_DISABLE_GUEST_CHECKOUT = 'catalog/downloadable/disable_guest_checkout';
1717

18+
/**
19+
* Xml path to get downloadable Shareable setting
20+
*/
21+
const XML_PATH_DOWNLOADABLE_SHAREABLE = 'catalog/downloadable/shareable';
22+
1823
/**
1924
* Core store config
2025
*
@@ -46,6 +51,10 @@ public function execute(\Magento\Framework\Event\Observer $observer)
4651
self::XML_PATH_DISABLE_GUEST_CHECKOUT,
4752
ScopeInterface::SCOPE_STORE,
4853
$store
54+
) && $this->_scopeConfig->isSetFlag(
55+
self::XML_PATH_DOWNLOADABLE_SHAREABLE,
56+
ScopeInterface::SCOPE_STORE,
57+
$store
4958
)) {
5059
return $this;
5160
}

0 commit comments

Comments
 (0)