cancel
Showing results for 
Search instead for 
Did you mean: 

Newsletter Subscription Message

SOLVED

Newsletter Subscription Message

Please tell me where this subscription message is:

 

==>  There was a problem with the subscription: Sorry, but the administrator denied subscription for guests. Please register.  <==

 

Thanks.

2 REPLIES

Re: Newsletter Subscription Message

Hello @shebafoods

In Magento vendor folder below file path

Magento\Newsletter\Controller\Subscriber\NewAction.php

* This message display as 2 part 

1) "There was a problem with the subscription:" In execute the function.

2) "Sorry, but the administrator denied subscription for guests. Please register." In same file "validateGuestSubscription" protected function throw message.

 

Query solved? Accept as Solution.Thanks
SarfarazAhmed

Re: Newsletter Subscription Message

Your Message comes from NewAction.php file,

Check file path in github,

__('There was a problem with the subscription: %1', $e->getMessage())

 

In above statement, $e->getMessage() comes dynamically from same file at below location,

'Sorry, but the administrator denied subscription for guests. Please <a href="%1">register</a>.'

 

If you want to change only string you can directly change from en_US files. Just create en_US.csv file into your code or theme folder,

en_US.csv#L81

string from en_US.csv

 

Please let me know if you have any issue.

 

If Issue Solved, Click Kudos/Accept As solutions.