Hello,
I can’t tell neither. I tested on a fresh install and everything works fine.
Thread Starter
airsid
(@airsid)
Hello,
Do you have a list of plugin you which can interfer with your plugin ?
And should it work when emails are received in gmail or yahoo ?
Regards.
There are thousands of plugins out there. I can’t give you a list but try to figure out which plugin could cause a conlict: any plugin sending something?
You said “Emails are still in plain text” but which email? When you send a test email from the WP Better Emails page, do you have the template?
I have the same issue and I noticed that WP Better Emails conflicts with the Paid Memberships Pro plugin. Any help would be greatly appreciated. Thanks.
Hi,
Basically, PMP already sends its email in an HTML format.
Have a look at the previous topic about PMP: http://wordpress.org/support/topic/compatibility-issue-with-paid-membership-pro
If you don’t want to edit core files. Try to paste this in your functions.php or plugin files:
remove_filter('wp_mail_content_type', 'pmpro_wp_mail_content_type');
I didn’t test this, this might remove some features.
Thread Starter
airsid
(@airsid)
Hello,
I’ve just tested and it seems to work. Thanks a lot!
But i wonder what do you mean by ” this might remove some features” ?
How can I know which features ?
Thanks so much. Worked for me. I share the same concerns as the user above. Are there any features that come to mind that user should be aware of?
Actually, there’s not much:
https://github.com/strangerstudios/paid-memberships-pro/blob/dev/includes/email.php#L83
Look at the lines 84 to 95, some variables like !!login_link!!, !!display_name!!, !!user_email!!, etc. are replaced by their actual value in the content of the email.
Looks like PMP uses these variables in a lot of emails.
So you just have to replace them yourself:
add_action('phpmailer_init', function( $phpmailer ) {
global $current_user;
$data = array(
"name" => $current_user->display_name,
"sitename" => get_option("blogname"),
"login_link" => pmpro_url("account"),
"display_name" => $current_user->display_name,
"user_email" => $current_user->user_email,
"subject" => $phpmailer->Subject
);
foreach($data as $key => $value) {
$phpmailer->Body = str_replace("!!" . $key . "!!", $value, $phpmailer->Body);
}
}, 999);
(The code uses a closure, be sure to have PHP5.3 or higher)
This isn’t tested, use with care.