diff --git a/inc/clean-emails.php b/inc/clean-emails.php
index 0b60b51..4781f32 100644
--- a/inc/clean-emails.php
+++ b/inc/clean-emails.php
@@ -181,7 +181,7 @@ private function add_comment_basics(): void {
* @return void
*/
private function add_author_line(): void {
- if ( $this->comment->comment_type === 'comment' ) {
+ if ( $this->comment->comment_type !== 'pingback' && $this->comment->comment_type !== 'trackback' ) {
/* translators: %1$s is replaced with the comment author's name, %2$s is replaced with the comment author's email */
$this->message .= \sprintf( \esc_html__( 'Author: %1$s (%2$s)', 'yoast-comment-hacks' ), \esc_html( $this->comment->comment_author ), '' . \esc_html( $this->comment->comment_author_email ) . '' ) . '
';
}
@@ -197,7 +197,7 @@ private function add_author_line(): void {
* @return void
*/
private function add_content_line(): void {
- if ( $this->comment->comment_type === 'comment' ) {
+ if ( $this->comment->comment_type !== 'pingback' && $this->comment->comment_type !== 'trackback' ) {
$this->message .= \esc_html__( 'Comment:', 'yoast-comment-hacks' );
}
else {