Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation
AdditionalFields::render_content()
This renders the content of the block within the wrapper.
Method of the class: AdditionalFields{}
No Hooks.
Return
String
.
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: ''
AdditionalFields::render_content() AdditionalFields::render content code WC 9.6.1
protected function render_content( $order, $permission = false, $attributes = [], $content = '' ) { if ( ! $permission ) { return $content; } $controller = Package::container()->get( CheckoutFields::class ); $content .= $this->render_additional_fields( $controller->filter_fields_for_order_confirmation( array_merge( $controller->get_order_additional_fields_with_values( $order, 'contact', 'other', 'view' ), $controller->get_order_additional_fields_with_values( $order, 'order', 'other', 'view' ), ) ) ); return $content; }