Вопрос

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