Automattic\WooCommerce\Blocks\Domain\Services
CheckoutFieldsFrontend::render_order_other_fields()
Renders additional fields on the order details page.
Method of the class: CheckoutFieldsFrontend{}
No Hooks.
Return
null
. Nothing (null).
Usage
$CheckoutFieldsFrontend = new CheckoutFieldsFrontend(); $CheckoutFieldsFrontend->render_order_other_fields( $order );
- $order(WC_Order) (required)
- Order object.
CheckoutFieldsFrontend::render_order_other_fields() CheckoutFieldsFrontend::render order other fields code WC 9.7.1
public function render_order_other_fields( $order ) { $fields = array_merge( $this->checkout_fields_controller->get_order_additional_fields_with_values( $order, 'contact', 'other', 'view' ), $this->checkout_fields_controller->get_order_additional_fields_with_values( $order, 'order', 'other', 'view' ), ); if ( ! $fields ) { return; } echo '<section class="wc-block-order-confirmation-additional-fields-wrapper">'; echo '<h2>' . esc_html__( 'Additional information', 'woocommerce' ) . '</h2>'; echo $this->render_additional_fields( $fields ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '</section>'; }