Skip to content

Commit 5c9da4c

Browse files
committed
ACP2E-3493: Expired persistent quotes are not cleaned up by a cron job sales_clean_quotes
- Fixed the CR comments.
1 parent dbcaec9 commit 5c9da4c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/code/Magento/Persistent/Observer/ClearExpiredCronJobObserver.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class ClearExpiredCronJobObserver
2020
*
2121
* @var CollectionFactory
2222
*/
23-
private CollectionFactory $websiteCollectionFactory;
23+
protected CollectionFactory $_websiteCollectionFactory;
2424

2525
/**
2626
* A property for session factory
2727
*
2828
* @var SessionFactory
2929
*/
30-
private SessionFactory $sessionFactory;
30+
protected SessionFactory $_sessionFactory;
3131

3232
/**
3333
* A property for delete expired quote factory
@@ -46,8 +46,8 @@ public function __construct(
4646
SessionFactory $sessionFactory,
4747
DeleteExpiredQuoteFactory $deleteExpiredQuoteFactory = null
4848
) {
49-
$this->websiteCollectionFactory = $websiteCollectionFactory;
50-
$this->sessionFactory = $sessionFactory;
49+
$this->_websiteCollectionFactory = $websiteCollectionFactory;
50+
$this->_sessionFactory = $sessionFactory;
5151
$this->deleteExpiredQuoteFactory = $deleteExpiredQuoteFactory ?:
5252
ObjectManager::getInstance()->get(DeleteExpiredQuoteFactory::class);
5353
}
@@ -61,13 +61,13 @@ public function __construct(
6161
*/
6262
public function execute(Schedule $schedule)
6363
{
64-
$websiteIds = $this->websiteCollectionFactory->create()->getAllIds();
64+
$websiteIds = $this->_websiteCollectionFactory->create()->getAllIds();
6565
if (!is_array($websiteIds)) {
6666
return $this;
6767
}
6868

6969
foreach ($websiteIds as $websiteId) {
70-
$this->sessionFactory->create()->deleteExpired($websiteId);
70+
$this->_sessionFactory->create()->deleteExpired($websiteId);
7171
$this->deleteExpiredQuoteFactory->create()->deleteExpiredQuote($websiteId);
7272
}
7373

0 commit comments

Comments
 (0)