There is another issue. Once your plugin is activated, all newly registered accounts’ welcome emails are coming in to admin’s email.
Example, my site name is “Apple” and admin email is [email protected].
New customer Sam is registering and his email is [email protected].
“Apple” from [email protected] is sending a welcome email to Sam.
Sam / [email protected] should receive a welcome email from “Apple”, but this welcome email comes back to my store’s “Apple” [email protected] inbox.
Nothing delivers to Sam.
But the welcome email successfully delivers to Sam once I turn off your plugin.
I double checked turning on and off your plug in to make sure your plugin is causing this error.