/** * Check whether notification is displayed * * @return bool */ public function isDisplayed() { // Check configuration to see if this should be evaluated further if ($this->avaTaxConfig->isModuleEnabled() == false || $this->avaTaxConfig->getTaxMode($this->storeManager->getDefaultStoreView()) != Config::TAX_MODE_ESTIMATE_AND_SUBMIT || $this->avaTaxConfig->getQueueAdminNotificationEnabled() == false) { return false; } // Query the database to get some stats about the queue $this->loadQueueStats(); // Determine if we need to notify the admin user if ($this->authorization->isAllowed('ClassyLlama_AvaTax::manage_avatax') && $this->statQueueCount > 0) { return true; } else { return false; } }