WC_Comments::comment_moderation_recipients()public staticWC 1.0

Modify recipient of review email.

Method of the class: WC_Comments{}

No Hooks.

Return

Array.

Usage

$result = WC_Comments::comment_moderation_recipients( $emails, $comment_id );
$emails(array) (required)
Emails.
$comment_id(int) (required)
Comment ID.

WC_Comments::comment_moderation_recipients() code WC 9.4.2

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;
}