i am trying to add extension attribute for Magento\Quote\Api\Data\AddressInterface but i am facing below issue.

Message: Property "Addressfiled" does not have corresponding setter in class "Magento\Quote\Api\Data\AddressExtensionInterface". 

Any one could you please provide solution for this.

  • Once you create an extension attribute the corresponding setter class will be set in "/generated/code/Magento/Quote/Api/Data/AddressExtension.php" file.. Check If your extenstion att.is set in this file else try after clearing the generated files. – Haritha Mar 5 '18 at 7:43
  • my attribute not appearing in that file. – Ramesh Mar 5 '18 at 7:52
  • 1
    Try clearing the generated files and check if the setter is autogenerated in interface and implementation classes. – Haritha Mar 5 '18 at 8:18

Add the attribute to your extension_attributes.xml file:

<extension_attributes for="Magento\Quote\Api\Data\AddressInterface">
    <attribute code="attribute_code_here" type="string" />

After adding it you will have to run:

bin/magento setup:di:compile 

Hope it works

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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