Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation

AdditionalFieldsWrapper::render_content()protectedWC 1.0

This renders the content of the downloads wrapper.

Method of the class: AdditionalFieldsWrapper{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->render_content( $order, $permission, $attributes, $content );
$order(\WC_Order) (required)
Order object.
$permission(string|false)
If the current user can view the order details or not.
Default: false
$attributes(array)
Block attributes.
Default: []
$content(string)
Original block content.
Default: ''

AdditionalFieldsWrapper::render_content() code WC 8.9.0

protected function render_content( $order, $permission = false, $attributes = [], $content = '' ) {
	if ( ! $permission ) {
		return '';
	}

	// Contact and additional fields are currently grouped in this section.
	$additional_fields = array_merge(
		Package::container()->get( CheckoutFields::class )->get_fields_for_location( 'contact' ),
		Package::container()->get( CheckoutFields::class )->get_fields_for_location( 'order' )
	);

	return empty( $additional_fields ) ? '' : $content;
}