Buddypress Plain text mail compatibility with WP HTML Mail.
-
Buddypress Plain text mail compatibility with WP HTML Mail.
You can add the following code in your bp-custom.php file.
Location: wp-content/plugins/bp-custom.php if file is not there than you can create the bp-custom.php file and add the below code.
add_filter('bp_email_use_wp_mail', '__return_true'); add_filter( 'wp_mail_content_type', 'chavod_use_html_wp_mail' ); function chavod_use_html_wp_mail() { return 'text/html'; } add_filter( 'bp_email_get_content_plaintext', 'chavod_get_bp_email_content_plaintext', 10, 4 ); function chavod_get_bp_email_content_plaintext( $content = '', $property = 'content_plaintext', $transform = 'replace-tokens', $bp_email ) { if ( ! did_action( 'bp_send_email' ) ) { return $content; } return $bp_email->get_template( 'add-content' ); }
- You must be logged in to reply to this topic.