Huge bug in MP Pluggable class – attachment with wp_mail not working
-
Its misspelled mixed up variables in the protocol of MP_Pluggable_class.php
$attachements - $attachment - $attachments
For example, sending pdf with woocommerce, using MailPress as WP_MAIL as default settings.
Replace with this and everything works fine:
class MP_Pluggable { public static function wp_mail( $to, $subject, $message, $headers = '', $attachments = false ) { // Compact the input, apply the filters, and extract them back out extract( apply_filters('wp_mail', compact( 'to', 'subject', 'message', 'headers' ) ) ); if ( !is_array($attachments) ) $attachments = explode( "\n", str_replace( "\r\n", "\n", $attachments ) ); $mail = new stdClass(); // Attachments if (is_array($attachments)) { $f = true; $attachments = @str_replace("\\", "/", $attachments); foreach ($attachments as $attachment)
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Huge bug in MP Pluggable class – attachment with wp_mail not working’ is closed to new replies.