Add method to set unsubscribeToken to Newsletter factory
[MAILPOET-5680]
This commit is contained in:
committed by
Aschepikov
parent
b2afbf99c5
commit
13c105f6d9
@@ -173,6 +173,11 @@ class Newsletter {
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withUnsubscribeToken(string $unsubscribeToken) {
|
||||
$this->data['unsubscribeToken'] = $unsubscribeToken;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Newsletter
|
||||
*/
|
||||
@@ -417,6 +422,10 @@ class Newsletter {
|
||||
if (isset($this->data['ga_campaign'])) $newsletter->setGaCampaign($this->data['ga_campaign']);
|
||||
if (isset($this->data['wp_post_id'])) $newsletter->setWpPostId($this->data['wp_post_id']);
|
||||
|
||||
if (isset($this->data['unsubscribeToken'])) {
|
||||
$newsletter->setUnsubscribeToken($this->data['unsubscribeToken']);
|
||||
}
|
||||
|
||||
return $newsletter;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user