self { $this->providers->add($provider); return $this; } /** * {@inheritdoc} */ public function get($id, bool $new = false) { if ($this->definitions->has($id)) { $resolved = $this->definitions->resolve($id, $new); return $this->inflectors->inflect($resolved); } if ($this->definitions->hasTag($id)) { $arrayOf = $this->definitions->resolveTagged($id, $new); array_walk($arrayOf, function (&$resolved) { $resolved = $this->inflectors->inflect($resolved); }); return $arrayOf; } if ($this->providers->provides($id)) { $this->providers->register($id); if (!$this->definitions->has($id) && !$this->definitions->hasTag($id)) { throw new ContainerException(sprintf('Service provider lied about providing (%s) service', $id)); } return $this->get($id, $new); } foreach ($this->delegates as $delegate) { if ($delegate->has($id)) { $resolved = $delegate->get($id); return $this->inflectors->inflect($resolved); } } throw new NotFoundException(sprintf('Alias (%s) is not being managed by the container or delegates', $id)); } /** * {@inheritdoc} */ public function has($id) : bool { if ($this->definitions->has($id)) { return true; } if ($this->definitions->hasTag($id)) { return true; } if ($this->providers->provides($id)) { return true; } foreach ($this->delegates as $delegate) { if ($delegate->has($id)) { return true; } } return false; } /** * Allows for manipulation of specific types on resolution. * * @param string $type * @param callable|null $callback * * @return InflectorInterface */ public function inflector(string $type, callable $callback = null) : InflectorInterface { return $this->inflectors->add($type, $callback); } /** * Delegate a backup container to be checked for services if it * cannot be resolved via this container. * * @param ContainerInterface $container * * @return self */ public function delegate(ContainerInterface $container) : self { $this->delegates[] = $container; if ($container instanceof ContainerAwareInterface) { $container->setLeagueContainer($this); } return $this; } }
Fatal error: Uncaught Error: Class "Automattic\WooCommerce\Vendor\League\Container\Container" not found in /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ExtendedContainer.php:19 Stack trace: #0 /htdocs/wp-content/plugins/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php(90): require() #1 /htdocs/wp-content/plugins/woocommerce/src/Container.php(97): Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackā“„13_5\al3_0_8\PHP_Autoloader::load_class('Automattic\\WooC...') #2 /htdocs/wp-content/plugins/woocommerce/woocommerce.php(42): Automattic\WooCommerce\Container->__construct() #3 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #4 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #5 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #6 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #7 /htdocs/index.php(17): require('/htdocs/wp-blog...') #8 {main} thrown in /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ExtendedContainer.php on line 19