php - Accessing a legacy Shopware plugin from one written for Shopware 5.2 -
i'm developing plugin shopware 5.2. however, in application, there legacy plugins before upgrade version 5.2.
the documentation tells me use call in order access specific plugin within plugin:
$plugin = shopware()->container()->get('kernel')->getplugins()['anotherplugin'];
unfortunately, returns null
legacy plugins, method getplugins()
returns array containing plugins written version 5.2 (those residing in custom/plugins
folder).
how can deal issue?
for legacy versions can retrieve plugins container:
shopware()->container()->get('plugins')->backend()->nameofyourplugin();
or frontend
if frontend plugin
or core
if shopware core legacy plugin.
i suggest migrate new structure, because not supported long (if not 5.3).
Comments
Post a Comment