Magento 2 Certification Questions List | You need to show some additional data when it calls API method on a customerRepository, but not save it in database. What you will do? choose 3

You need to show some additional data when it calls API method on a customerRepository, but not save it in database. What you will do? choose 3

Answer:
  • add plugins after* on all methods that return CustomerInterface
  • set extensionAttribute to CustomerInterface's instance
  • if getExtensionAttribute returns null, create new instance
Prepear for Magento 2 certefication with our interactive quiz