Title: Bug that breaks other plugins
Last modified: November 23, 2018

---

# Bug that breaks other plugins

 *  [Manzoor Wani](https://wordpress.org/support/users/manzoorwanijk/)
 * (@manzoorwanijk)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/bug-that-breaks-other-plugins/)
 * Refer to [this screenshot](https://imgur.com/R5NnhzE) to see what I’m referring
   to. `apply_filters( 'wp_mail', 'wp_mail' );` apparently serves no purpose there,
   instead breaks other plugins that hook into `wp_mail` and expect the argument
   passed to be an array.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Varun Sharma](https://wordpress.org/support/users/contact-banker/)
 * (@contact-banker)
 * [7 years ago](https://wordpress.org/support/topic/bug-that-breaks-other-plugins/#post-11453565)
 * This is being done to override the wp_mail function to register email logs.
 * The wp_mail function accepts arguments as an array.
 * The reason of the confliction, might be using two mail plugins on your website.
 * You cannot use two mail smtp plugins at the same time.
 * Thanks & Regards.
 *  Thread Starter [Manzoor Wani](https://wordpress.org/support/users/manzoorwanijk/)
 * (@manzoorwanijk)
 * [7 years ago](https://wordpress.org/support/topic/bug-that-breaks-other-plugins/#post-11453598)
 * I don’t use your plugin. I’m a plugin developer. I guess you have either made
   a mistake or you don’t know what `apply_filters` does.
 * Let me explain:
 * By calling `apply_filters` with `wp_mail` as the tag, it will call all the callbacks
   hooked into `wp_mail` filter and will pass `'wp_mail'` (string) value as the 
   parameter.
 * Did you want to use `add_filter` instead? Which I again doubt, as it will create
   a loop (may be infinite)if you pass `'wp_mail'` string as the second parameter.
 *  Thread Starter [Manzoor Wani](https://wordpress.org/support/users/manzoorwanijk/)
 * (@manzoorwanijk)
 * [7 years ago](https://wordpress.org/support/topic/bug-that-breaks-other-plugins/#post-11453614)
 * You can see [here](https://core.trac.wordpress.org/browser/tags/5.1.1/src/wp-includes/pluggable.php#L186)
   how it works.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Bug that breaks other plugins’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-mail-bank_724f4f.svg)
 * [Mail Bank - #1 Mail SMTP Plugin for WordPress](https://wordpress.org/plugins/wp-mail-bank/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-bank/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-bank/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-bank/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-bank/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-bank/reviews/)

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [wp_mail](https://wordpress.org/support/topic-tag/wp_mail/)

 * 3 replies
 * 2 participants
 * Last reply from: [Manzoor Wani](https://wordpress.org/support/users/manzoorwanijk/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/bug-that-breaks-other-plugins/#post-11453614)
 * Status: not resolved