Skip to content

Fetching customer entity through API will not return 'is_subscribed' extension attribute #13252

Closed
@koenner01

Description

@koenner01

In the Magento_Newsletter module an extension attribute 'is_subscribed' is defined for the \Magento\Customer\Api\Data\CustomerInterface. However when fetching the customer through api, the extension attribute is not present in the data.

Preconditions

  1. PHP7
  2. CE 2.2.2 (also tested EE 2.2.2)

Steps to reproduce

  1. Create a new customer through the frontend registration and make sure to check the subscribe to newsletter checkbox
  2. Fetch the newly created customer through the api call '../rest/nl/V1/customers/{newCustomerId}'

Expected result

  1. Extension attributes are present in the data containing a value for 'is_subscribed'

Actual result

  1. The extension attributes are missing from the customer data

I did some basic digging into the core and noticed there is no actual place in the Magento_Newsletter module that sets the extension attribute 'is_subscribed' after the customer is fetched.

I compared this with the Magento_GiftMessage module where in the Magento\GiftMessage\Model\Plugin folder there are several classes which contain logic to add extension attributes to the orders when fetching and saving.

Seems like somebody dropped the ball when programming the Magento_Newsletter module.
#magentomagic

Metadata

Metadata

Assignees

Labels

Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions