@joaomluz
7 years, 7 months ago
Thanks for your help.
I add this filter but i have also to change bp_send_email function in file /buddypress/bp-core/bp-core-functions.php. then it works.
Before:
$must_use_wpmail = apply_filters( 'bp_email_use_wp_mail', $wp_html_emails || ! $is_default_wpmail ); if ( $must_use_wpmail ) { $to = $email->get( 'to' ); return wp_mail( array_shift( $to )->get_address(), $email->get( 'subject', 'replace-tokens' ), $email->get( 'content_plaintext', 'replace-tokens' ) ); }
After:
$must_use_wpmail = apply_filters( 'bp_email_use_wp_mail', $wp_html_emails || ! $is_default_wpmail ); if ( $must_use_wpmail ) { $to = $email->get( 'to' ); return wp_mail( array_shift( $to )->get_address(), $email->get( 'subject', 'replace-tokens' ), $email->get_template( 'add-content' ) ); }
Is there any way to hook/override this “$email->get_template( ‘add-content’ )” keeping the plugin core unchanged?