WC_Comments::comment_moderation_recipients() public WC 1.0
Modify recipient of review email.
{} Это метод класса: WC_Comments{}
Хуков нет.
Возвращает
Массив.
Использование
$result = WC_Comments::comment_moderation_recipients( $emails, $comment_id );
- $emails(массив) (обязательный)
- Emails.
- $comment_id(число) (обязательный)
- Comment ID.
Код WC_Comments::comment_moderation_recipients() WC Comments::comment moderation recipients WC 5.0.0
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;
}