Magento 2 : How to set custom data in an around plugin and accessing it in a ViewModel

Setting custom data in an around plugin and accessing it in a ViewModel involves a more indirect approach, as plugins are primarily meant to modify the behavior of methods, not directly interact with view models. However, you can achieve this by using the request object to store the custom data and then accessing it through dependency injection in a ViewModel. Here's how you can do it:

Continue ReadingMagento 2 : How to set custom data in an around plugin and accessing it in a ViewModel