Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'phpmailer_init', 'wpas_custom_email_notification_delimiter', 99 );
- /**
- * Add the e-mail notification delimiter at the very beginning of e-mails
- *
- * @param object $phpmailer
- * @return void
- */
- function wpas_custom_email_notification_delimiter( $phpmailer ) {
- if ( isset( $phpmailer->Subject ) && false !== strpos( $phpmailer->Subject, 'YOUR_FIXED_STRING' ) ) {
- $phpmailer->Body = str_replace( '<!-- AS_HEADER -->', '<div style="color:#b5b5b5">##- Please type your reply above this line -##</div>', $phpmailer->Body );
- }
- }
- add_action( 'plugins_loaded', 'wpas_remove_default_email_delimiter', 25 );
- /**
- * Remove the default delimiter
- *
- * @return void
- */
- function wpas_remove_default_email_delimiter() {
- remove_filter( 'wpas_email_notifications_body', array( WPAS_Email::get_instance(), 'add_delimiter' ), 10 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement