3

Is it possible to override vendor/magento/module-sales/Api/Data/OrderAddressInterface.php as I want to get sales order address custom column value in order REST API.

1 Answer 1

3

It's not possible to override the interfaces using the preference. Magento 2 does not allow Third-party developers to change the API Data interfaces defined in the Magento Core code.

Please try to use the Extension attributes to achieve your requirement. Extension attributes extend functionality and often use more complex data types than custom attributes. These attributes do not appear on the GUI.

Please refer to the Magento DevDocs for more information here.

Also, refer to this post with similar question if it helps! Magento 2 : Override core Interface and Model

8
  • But I'm not able get sales order address custom column value in order REST API. Could you please help me on this Commented Jun 10, 2020 at 14:59
  • Please check this post: magento.stackexchange.com/questions/235947/… Commented Jun 10, 2020 at 16:33
  • I want to get the custom attribute value from sales order address table that to in shipping address. I'm using magento 2.3.2 EE Commented Jun 11, 2020 at 2:39
  • Friends please help me Commented Jun 11, 2020 at 2:41
  • Have you tried to use an extension attribute and get the value of the custom attribute? Check the example here: magehit.com/blog/… Commented Jun 12, 2020 at 1:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.