{ $this->settingsRepository->remove($setting); $this->settingsRepository->flush(); } unset($this->settings[$key]); } /** * Returns true if a value is stored in the database for the given key * * @param string $key * * @return bool */ public function hasSavedValue(string $key): bool { return $this->get($key, 'unset') !== 'unset'; } private function ensureLoaded() { if ($this->loaded) { return; } $this->settings = []; foreach ($this->settingsRepository->findAll() as $setting) { $this->settings[$setting->getName()] = $setting->getValue(); } $this->loaded = true; } private function getDefaultValue($keys) { $default = $this->getAllDefaults(); foreach ($keys as $key) { if (array_key_exists($key, $default)) { $default = $default[$key]; } else { return null; } } return $default; } private function fetchValue($key) { $setting = $this->settingsRepository->findOneByName($key); return $setting ? $setting->getValue() : null; } public function resetCache() { $this->settings = []; $this->loaded = false; } public static function setInstance($instance) { self::$instance = $instance; } /** @return SettingsController */ public static function getInstance() { if (isset(self::$instance)) return self::$instance; return ContainerWrapper::getInstance()->get(SettingsController::class); } }
Fatal error: Uncaught Error: Class "MailPoet\Settings\SettingsController" not found in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php:4898 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2633): MailPoetGenerated\FreeCachedContainer->getSettingsController2Service() #1 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #2 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #3 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #4 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #5 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #6 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #7 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #8 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #9 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #10 /htdocs/index.php(17): require('/htdocs/wp-blog...') #11 {main} thrown in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php on line 4898