Is there a way to override ViewModel Function
I Have a installed a Module in vendor but I want to override Function of ViewModel
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
You still be able to using preference or plugin for the ViewModel Class.
<preference for="Magento\Customer\ViewModel\Address" type="Foo\Bar\ViewModel\Address"/> <type name="Magento\Customer\ViewModel\Address"> <plugin sortOrder="10" name="Foo_Bar::do_stuff" type="Foo\Bar\Plugin\ViewModel\AddressPlugin"/> </type>