Notifications
Clear all
Topic starter
An Adobe Commerce architect is tasked with adding custom data to orders fetched from the API While keeping best practices in mind, how would the developer achieve this?
- A . Create an extension attribute on Magento\Seles\Api\Data\OrderInterface and an after plugin on Magento\Sales\Model\Order: :getExtensionAttributes() to add the custom data.
B. Create a before plugin on Magento\Sales\Model\ResourceMode\Order\Collection:: load and alter the query to fetch the additional data. Data will then be automatically added to the items fetched from the API.
C. Create an extension attribute on Magento\Sales\ApI\Data\Orderinterface and an after plugin on Magento\sales\Api\orderRespositoryinterface on get() and getlist () to add the custom data.
Suggested Answer: A
Posted : 16/01/2023 6:43 am