@@ -80,24 +80,24 @@ public function execute()
80
80
->getIsSubscribed ();
81
81
$ isSubscribedParam = (boolean )$ this ->getRequest ()
82
82
->getParam ('is_subscribed ' , false );
83
- if ($ isSubscribedParam != $ isSubscribedState ) {
83
+ if ($ isSubscribedParam !== $ isSubscribedState ) {
84
84
$ this ->customerRepository ->save ($ customer );
85
85
if ($ isSubscribedParam ) {
86
86
$ subscribeModel = $ this ->subscriberFactory ->create ()
87
87
->subscribeCustomerById ($ customerId );
88
88
$ subscribeStatus = $ subscribeModel ->getStatus ();
89
89
if ($ subscribeStatus == Subscriber::STATUS_SUBSCRIBED ) {
90
- $ this ->messageManager ->addSuccess (__ ('We saved the subscription. ' ));
90
+ $ this ->messageManager ->addSuccess (__ ('We have saved your subscription. ' ));
91
91
} else {
92
- $ this ->messageManager ->addSuccess (__ ('The confirmation request has been sent. ' ));
92
+ $ this ->messageManager ->addSuccess (__ ('A confirmation request has been sent. ' ));
93
93
}
94
94
} else {
95
95
$ this ->subscriberFactory ->create ()
96
96
->unsubscribeCustomerById ($ customerId );
97
- $ this ->messageManager ->addSuccess (__ ('We removed the subscription. ' ));
97
+ $ this ->messageManager ->addSuccess (__ ('We have removed your newsletter subscription. ' ));
98
98
}
99
99
} else {
100
- $ this ->messageManager ->addSuccess (__ ('We updated the subscription. ' ));
100
+ $ this ->messageManager ->addSuccess (__ ('We have updated your subscription. ' ));
101
101
}
102
102
} catch (\Exception $ e ) {
103
103
$ this ->messageManager ->addError (__ ('Something went wrong while saving your subscription. ' ));
0 commit comments