# Uncaught Error: Class 'Shopware\\Components\\Plugin' not found

**URL:** <https://forum.shopware.com/t/uncaught-error-class-shopware-components-plugin-not-found/98007>\
**Category:** Shopware 6 (English)\
**Tags:** programming\
**Created:** [14. Januar 2023 um 10:13 UTC](https://forum.shopware.com/t/uncaught-error-class-shopware-components-plugin-not-found/98007 "2023-01-14T10:13:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luca.schneider](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@luca.schneider](https://forum.shopware.com/u/luca.schneider)\
**Post date:** [14. Januar 2023 um 10:13 UTC](https://forum.shopware.com/t/uncaught-error-class-shopware-components-plugin-not-found/98007/1 "2023-01-14T10:13:42Z")

</div>

```auto
PHP Fatal error: Uncaught Error: Class 'Shopware\Components\Plugin' not found in /var/www/html/shopware/custom/plugins/OrderMail/src/OrderMail.php:14
Stack trace:
#0 /var/www/html/shopware/vendor/composer/ClassLoader.php(578): include()
#1 /var/www/html/shopware/vendor/composer/ClassLoader.php(432): Composer\Autoload\ClassLoader::Composer\Autoload\{closure}()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 [internal function]: spl_autoload_call()
#4 /var/www/html/shopware/vendor/shopware/core/Framework/Plugin/KernelPluginLoader/KernelPluginLoader.php(282): class_exists()
#5 /var/www/html/shopware/vendor/shopware/core/Framework/Plugin/KernelPluginLoader/KernelPluginLoader.php(126): Shopware\Core\Framework\Plugin\KernelPluginLoader\KernelPluginLoader->instantiatePlugins()
#6 /var/www/html/shopware/vendor/shopware/core/Kernel.php(137): Shopware\Core\Framework\Plugin\KernelPluginLoader\KernelPluginLoader->initializePlugins()
#7 /var/www/html/shopware/vendor/symfony/framework-bundle/Console/Application.php(16 in /var/www/html/shopware/custom/plugins/OrderMail/src/OrderMail.php on line 14

```

Any clue why this happens or how to fix it?

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [14. Januar 2023 um 13:11 UTC](https://forum.shopware.com/t/uncaught-error-class-shopware-components-plugin-not-found/98007/2 "2023-01-14T13:11:25Z")

</div>

> [@luca.schneider](#):
>
> `OrderMail`

That plugin wants to use the class ‚Shopware\Components\Plugin‘ that does not exist. Your plugin needs to be fixed at line 14.
