Automattic\WooCommerce\Blocks\Domain\Services\CheckoutFieldTypes

AbstractFieldType::registration_error │ protected │ WC 1.0

Reports a field registration error and prevents the field from being registered.

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

Хуков нет.

Возвращает

false.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->registration_error( $id, $reason, $version ): bool;
$id(строка) (обязательный)
The ID of the field being registered.
$reason(строка) (обязательный)
The reason the field cannot be registered.
$version(строка) (обязательный)
The version the misuse was introduced in.

Код AbstractFieldType::registration_error() WC 11.2.2

protected function registration_error( string $id, string $reason, string $version ): bool {
	return $this->doing_it_wrong( sprintf( 'Unable to register field with id: "%s". %s', $id, $reason ), $version );
}