Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling the field "name" in the addRecipient api doesn't updates the Subscriber name on Mailup #7

Open
enrike1983 opened this issue Oct 15, 2019 · 5 comments

Comments

@enrike1983
Copy link
Contributor

No description provided.

@massimilianobraglia
Copy link
Member

Hey @enrike1983!
You have to call MailingList::updateRecipient($recipient) instead of MailingList::addRecipient($recipient)

@enrike1983
Copy link
Contributor Author

enrike1983 commented Oct 16, 2019

hi @massimilianobraglia thank you for the info. This means that the "name" parameter for addRecipient is useless, shouldn't be better to remove it from that method?

@massimilianobraglia
Copy link
Member

massimilianobraglia commented Oct 16, 2019

Can you tell me where is the name parameter? MailingList::addRecipient() signature is the following:

    public function addRecipient(Recipient $recipient): Recipient

There is no name parameter

@enrike1983
Copy link
Contributor Author

Sorry @massimilianobraglia , I meant that the "recipient" class accepts the "name" parameter in the constructor but that specific argument doesn't seems to be added/updated to the recipient entry in the Mailup list

@massimilianobraglia
Copy link
Member

@enrike1983 to update a recipient in a list first you have to retrieve it via the MailingList:: findRecipient() method and then use the MailingList::updateRecipient() method. The recipient construction just creates a new instance and then you have to use the MailingList::addRecipient to save it in MailUP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants