WC_Comments::comment_moderation_recipients( array $emails, int $comment_id )

Modify recipient of review email.


Description Description


Parameters Parameters

$emails

(Required) Emails.

$comment_id

(Required) Comment ID.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/class-wc-comments.php

	public static function comment_moderation_recipients( $emails, $comment_id ) {
		$comment = get_comment( $comment_id );

		if ( $comment && 'product' === get_post_type( $comment->comment_post_ID ) ) {
			$emails = array( get_option( 'admin_email' ) );
		}

		return $emails;
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.