Skip to content

Commit fdfa5c6

Browse files
committed
MAGETWO-89238: [Sales email] Disabled invoice emails produce performance issue
1 parent 77496c4 commit fdfa5c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Store/Model/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,14 +1056,14 @@ public function getWebsiteId()
10561056
*/
10571057
public function afterSave()
10581058
{
1059+
$this->_storeManager->reinitStores();
10591060
if ($this->isObjectNew()) {
10601061
$event = $this->_eventPrefix . '_add';
10611062
} else {
10621063
$event = $this->_eventPrefix . '_edit';
10631064
}
10641065
$store = $this;
10651066
$this->getResource()->addCommitCallback(function () use ($event, $store) {
1066-
$this->_storeManager->reinitStores();
10671067
$this->eventManager->dispatch($event, ['store' => $store]);
10681068
});
10691069
return parent::afterSave();

0 commit comments

Comments
 (0)