I want to extend some core function via the plugin and it should work in only when function call via REST API so in short my override things are only for REST API scope not for the web.
is this possible in Magento 2 and how can I write a plugin using di.xml which only call when request form API
Any idea? any help appreciate
Best Answer
You need to create plugin in di.xml inside etc/webapi_rest folder to call plugin only in REST API.
Example :
Add your plugin based on your requirement in di.xml.