سؤال

I want to override a core plugin in Magento\Sales\Controller\Order\Plugin -> Authentication.php Is this even possible to achieve.

هل كانت مفيدة؟

المحلول

After disable core plugin you can override

Vender\Module\etc\di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Sales\Controller\Order\Plugin\Authentication">
        <plugin name="authentication" disabled="true" />
        <plugin name="vender_module_authentication" type="Vendor\Module\Controller\Order\Plugin\Authentication" sortOrder="60" disabled="false"/>
    </type>
</config>

نصائح أخرى

I would advise againts overriding the plugin, but adding your own plugin to that plugin and do your customisation that way. This way you avoid future errors.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top