Automattic\WooCommerce\EmailEditor\Validator
Schema::field
Set the field name and value.
Method of the class: Schema{}
No Hooks.
Returns
static.
Usage
$Schema = new Schema(); $Schema->field( $name, $value );
- $name(string) (required)
- Name of the field.
- $value(mixed) (required)
- Value of the field.
Schema::field() Schema::field code WC 10.8.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 );
}