I have created around plugin for isAttributeValid function for Magento\ImportExport\Model\Import\Entity\AbstractEntity but it is not working.
code:
<type name="Magento\ImportExport\Model\Import\Entity\AbstractEntity">
<plugin name="bbb" type="xxxx\yyy\Plugin\Entity\AbstractEntity" sortOrder="10" />
</type>
in the plugin:
<?php
namespace XXX\YYY\Plugin\Entity;
class AbstractEntity
{
public function aroundIsAttributeValid(
$subject, $attrCode, $result) {
$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info('hhhuu');
echo "hhh";exit();
$returnValue = $subject;
return $returnValue;
}
}
but echo is not printed.
isAttributeValid
is called ? – Pawan Apr 10 '20 at 6:07IsAttributeValid
is called so i can check override is working or not – Pawan Apr 13 '20 at 11:09