You are redeclaring the variable $fields
after you define the email
key – this basically removes all previous values – instead you need to add a new key for comment_field
, for example:
// retain code before..
$fields['author'] = $author_field;
$fields['email'] = $email_field;
$fields['comment_field'] = sprintf(
'<p class="comment-form-comment"><label for="comment">%s</label><textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" required="required"></textarea></p>',
__( 'Your Review', 'theme-textdomain' )
);
$fields['cookies'] = $cookies_field;
// retain code after..
I also reduced your sprintf
to one single function, as you only need to use this once, you should also use your own text-domain
.