- This topic has 6 replies, 3 voices, and was last updated 7 years, 5 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Disable Registration Complete E-Mail Not Working
Greetings,
I am trying to disable the registration complete e-mail and used the given PHP tweak to do so. However, when I install the code in my functions.php of my theme (per the instructions), it knocks the whole site offline.
To troubleshoot it, I removed the contents in the email body and title in the SM settings prior, then installed the code, but it still took the site down.
Any idea what I’m missing?
Thanks!
However, when I install the code in my functions.php of my theme (per the instructions), it knocks the whole site offline.
1. Do you have any PHP programming experience?
2. “Where” in your functions.php file did you add the code?
My PHP experience is limited but not non-existent. As for the “where,” I have created a child theme, so within the functions.php file, there is a designated line where underneath you can include any auxiliary coding.
I have created a child theme, so within the functions.php file, there is a designated line where underneath you can include any auxiliary coding.
I suspect the location you added the code to is not being executed, before the plugin is. Try moving the code towards the front of the file.
It seems as though the code is coming back with a syntax error. The error states that the return on the last line isn’t parsing right.
add_filter('swpm_email_registration_complete_body', 'disable_rego_complete_email');
function disable_rego_complete_email($email_body)
{
//Empty the email body (this will disable the email)
$email_body = ''
return $email_body;
}
It should be:
$email_body = '';
I have fixed the error in the example code shown in the following page:
https://simple-membership-plugin.com/simple-membership-miscellaneous-php-tweaks/