# Shopware plugin works on 5.2 and 5.3 but doesnt work on 5.1.6

**URL:** <https://forum.shopware.com/t/shopware-plugin-works-on-5-2-and-5-3-but-doesnt-work-on-5-1-6/49186>\
**Category:** Programmierung\
**Tags:** shopping-worlds\
**Created:** [31. Oktober 2017 um 19:51 UTC](https://forum.shopware.com/t/shopware-plugin-works-on-5-2-and-5-3-but-doesnt-work-on-5-1-6/49186 "2017-10-31T19:51:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ristecona](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@ristecona](https://forum.shopware.com/u/ristecona)\
**Post date:** [31. Oktober 2017 um 19:51 UTC](https://forum.shopware.com/t/shopware-plugin-works-on-5-2-and-5-3-but-doesnt-work-on-5-1-6/49186/1 "2017-10-31T19:51:30Z")

</div>

Hi community! I have a plugin which works on shopware 5.2 and 5.3 but doesnt work on 5.1.6. Here is the start file which is called ebTaxApi.php and i believe something should be changed here, but I need help:

```
 'onGetTaxApiController',
            'Enlight_Controller_Front_StartDispatch' => 'onEnlightControllerFrontStartDispatch'
        ];
    }

    /**
     * @return string
     */
    public function onGetTaxApiController()
    {
        return $this->getPath() . '/Controllers/Api/Tax.php';
    }

    /**
     *
     */
    public function onEnlightControllerFrontStartDispatch()
    {
        $this->container->get('loader')->registerNamespace('Shopware\Components', $this->getPath() . '/Components/');
    }
}

```

Any help is appreciated. Thanks in advance!

&nbsp;

---

<div class="post-metadata">

**Author:** ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)\
**Post date:** [31. Oktober 2017 um 20:51 UTC](https://forum.shopware.com/t/shopware-plugin-works-on-5-2-and-5-3-but-doesnt-work-on-5-1-6/49186/2 "2017-10-31T20:51:11Z")

</div>

Hello,

this part:

```
$this->container->get('loader')->registerNamespace('Shopware\Components', $this->getPath() . '/Components/');

```

you can only use in shopware versions over 5.2. This function:

```
getSubscribedEvents()

```

too.

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [1. November 2017 um 09:34 UTC](https://forum.shopware.com/t/shopware-plugin-works-on-5-2-and-5-3-but-doesnt-work-on-5-1-6/49186/3 "2017-11-01T09:34:18Z")

</div>

Seems you are using the new plugin system. Since it is only available for 5.2+ installations, it won’t work on 5.1.6.

---

<div class="post-metadata">

**Author:** ![ristecona](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@ristecona](https://forum.shopware.com/u/ristecona)\
**Post date:** [1. November 2017 um 17:01 UTC](https://forum.shopware.com/t/shopware-plugin-works-on-5-2-and-5-3-but-doesnt-work-on-5-1-6/49186/4 "2017-11-01T17:01:45Z")

</div>

Thank you, I already know that haha its fixed by the way, thanks everyone
