/** * Method checks if observer can be run * * @return bool */ protected function canRun() { if (!$this->apiConfig->isAutoInvoiceEnabled()) { return false; } if (!$this->apiConfig->isEnabled()) { return false; } return true; }