Automattic\WooCommerce\Blocks\Domain\Services

CheckoutFieldsFrontend::render_additional_field()protectedWC 1.0

Render custom field.

Method of the class: CheckoutFieldsFrontend{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->render_additional_field( $field );
$field(array) (required)
An additional field and value.

CheckoutFieldsFrontend::render_additional_field() code WC 9.0.1

protected function render_additional_field( $field ) {
	return sprintf(
		'<dt>%1$s</dt><dd>%2$s</dd>',
		esc_html( $field['label'] ),
		esc_html( $field['value'] )
	);
}