File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/Magento/Downloadable/Observer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
92
92
if ($ purchasedLink ->getId ()) {
93
93
return $ this ;
94
94
}
95
- $ statusToEnable = $ this ->_scopeConfig ->getValue (
95
+ $ orderStatusToEnableItem = $ this ->_scopeConfig ->getValue (
96
96
\Magento \Downloadable \Model \Link \Purchased \Item::XML_PATH_ORDER_ITEM_STATUS ,
97
97
ScopeInterface::SCOPE_STORE ,
98
98
$ orderItem ->getOrder ()->getStoreId ()
@@ -155,10 +155,10 @@ public function execute(\Magento\Framework\Event\Observer $observer)
155
155
)->setNumberOfDownloadsBought (
156
156
$ numberOfDownloads
157
157
)->setStatus (
158
- 1 == $ statusToEnable ?
158
+ \ Magento \ Sales \ Model \ Order \Item:: STATUS_PENDING == $ orderStatusToEnableItem ?
159
159
\Magento \Downloadable \Model \Link \Purchased \Item::LINK_STATUS_AVAILABLE :
160
160
\Magento \Downloadable \Model \Link \Purchased \Item::LINK_STATUS_PENDING
161
- )->setCreatedAt (
161
+ )->setCreatedAt (
162
162
$ orderItem ->getCreatedAt ()
163
163
)->setUpdatedAt (
164
164
$ orderItem ->getUpdatedAt ()
You can’t perform that action at this time.
0 commit comments