<?php
namespace TotalTheme\Filters;

defined( 'ABSPATH' ) || exit;

/**
 * Hooks into "comment_form_fields".
 *
 * @package TotalTheme
 * @subpackage Filters
 * @version 5.4
 */
final class Comment_Form_Fields {

	/**
	 * Callback method.
	 */
	public static function callback( $fields ) {
		if ( get_theme_mod( 'comment_form_classic', true ) && ! is_singular( 'product' ) ) {
			$comment_field = $fields['comment'];
			unset( $fields['comment'] );
			$fields['comment'] = $comment_field;
		}

		return $fields;
	}

}