Automattic\WooCommerce\EmailEditor\Validator

Schema::field │ public │ WC 1.0

Set the field name and value.

Метод класса: Schema{}

Хуков нет.

Возвращает

static.

Использование

$Schema = new Schema();
$Schema->field( $name, $value );
$name(строка) (обязательный)
Name of the field.
$value(разное) (обязательный)
Value of the field.

Код Schema::field() WC 11.2.1

public function field( string $name, $value ) {
	if ( in_array( $name, $this->get_reserved_keywords(), true ) ) {
		throw new \Exception( \esc_html( "Field name '$name' is reserved" ) );
	}
	return $this->update_schema_property( $name, $value );
}