#StackBounty: #magento2 #plugin #after-plugin Execute Plugin Class from specific module in Magento2

Bounty: 50

I have created a custom reports using ui components.

For the export csv I have created a plugin class for this function.


<type name="MagentoUiModelExportMetadataProvider">
        <plugin name="custom_export1" type="VendorReport1PluginModifyExportPlugin" sortOrder="1" disabled="false"/>

I have used the same plugin in another 4 modules.


<type name="MagentoUiModelExportMetadataProvider">
        <plugin name="custom_export2" type="VendorReport2PluginModifyExportPlugin" sortOrder="1" disabled="false"/>

From the above code, if i export from any of the module, both the plugins are called, I need to avoid that,

When export is happened from Module Report1,the plugin from that module to be executed, if called from Report2, the plugin defined in that module need to call.

How this can be achieved? Can anyone help me to resolve this issue. Thanks in advance!!

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.