Hey khamarpratik,
The code which you provided by the link looks good. Maybe you need to check a few steps:
- Xml file needs to be placed by the path:
app/code/[Namespace]/[Module]/etc/di.xml
- When you place new xml files, you need to flush cache
- When you place new model, you need to run the compilation via console:
php bin/magento setup:di:compile
- Also if you create new module, you need to install it:
php bin/magento setup:upgrade
- And finally, check your code in the aroundUpdateAttributes method. Your code needs to be placed instead of this comment: "//do something with $productIds here".
Regards,
Plumrocket Team