r-a-y / bp-reply-by-email

Reply to BuddyPress items from the comfort of your email inbox. Currently in pre-release.
GNU General Public License v2.0
63 stars 9 forks source link

`wp_mail()` override causing double "marker" #97

Closed boonebgorges closed 7 years ago

boonebgorges commented 7 years ago

When using a plugin that overrides wp_mail(), the "Reply ABOVE THIS LINE..." marker is getting prepended twice. It looks like it's happening in set_bp_post_object() as well as wp_mail_filter(). I'm assuming that the one in wp_mail_filter() was the original one, and set_bp_post_object() is to support BP 2.5+ emails, but the latter was kept in place for backward compatibility. Does that sound right?

I can dig in more, but I thought this was something you might be able to answer very quickly.

r-a-y commented 7 years ago

Thanks for the report, @boonebgorges.

You are almost right, but I think it is safe to actually remove the marker from wp_mail_filter() since the marker should already be added in the set_bp_post_object() method.

I've done this in commit 7e8acab. Can you give it a test and report back?

This will break support for BP 2.4 and lower, but hopefully that shouldn't affect anyone!

boonebgorges commented 7 years ago

Seems to do the trick. Thank you sir!

r-a-y commented 7 years ago

Cool, thanks for verifying!