Automattic\WooCommerce\Blocks\Domain\Services

CheckoutFields::is_field()publicWC 1.0

Returns true if the given key is a valid field.

Method of the class: CheckoutFields{}

No Hooks.

Return

true|false. True if the field is valid, false otherwise.

Usage

$CheckoutFields = new CheckoutFields();
$CheckoutFields->is_field( $key );
$key(string) (required)
The field key.

CheckoutFields::is_field() code WC 9.1.2

public function is_field( $key ) {
	return array_key_exists( $key, $this->additional_fields );
}