Skip to content

Commit 915fe70

Browse files
committed
Merge remote-tracking branch 'origin/imported-magento-magento2-31189' into 2.4-develop-pr113
2 parents 8dde59b + 5fc9c11 commit 915fe70

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

app/code/Magento/Sales/Model/EmailSenderHandler.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ public function sendEmails()
132132
/** @var \Magento\Sales\Model\AbstractModel $item */
133133
foreach ($entityCollection->getItems() as $item) {
134134
if ($this->emailSender->send($item, true)) {
135-
$this->entityResource->save(
136-
$item->setEmailSent(true)
135+
$this->entityResource->saveAttribute(
136+
$item->setEmailSent(true),
137+
'email_sent'
137138
);
138139
}
139140
}

app/code/Magento/Sales/Test/Unit/Model/EmailSenderHandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected function setUp(): void
100100
false,
101101
false,
102102
true,
103-
['save']
103+
['saveAttribute']
104104
);
105105

106106
$this->entityCollection = $this->getMockForAbstractClass(
@@ -252,7 +252,7 @@ public function testExecute($configValue, $collectionItems, $emailSendingResult)
252252

253253
$this->entityResource
254254
->expects($this->once())
255-
->method('save')
255+
->method('saveAttribute')
256256
->with($collectionItem);
257257
}
258258
}

0 commit comments

Comments
 (0)