Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Backorders.php
Go to the documentation of this file.
1 <?php
13 
15 {
21  public function afterSave()
22  {
23  if ($this->isValueChanged() && (
24  $this->getOldValue() == \Magento\CatalogInventory\Model\Stock::BACKORDERS_NO
25  || $this->getValue() == \Magento\CatalogInventory\Model\Stock::BACKORDERS_NO
26  )
27  ) {
28  $this->_stockIndexerProcessor->markIndexerAsInvalid();
29  }
30  return parent::afterSave();
31  }
32 }