needs_shipping_address() || ! $order->has_shipping_address() ) { return $this->render_content_fallback(); } $address = '
' . wp_kses_post( $order->get_formatted_shipping_address() ) . '
'; $phone = $order->get_shipping_phone() ? '

' . esc_html( $order->get_shipping_phone() ) . '

' : ''; $controller = Package::container()->get( CheckoutFields::class ); $custom = $this->render_additional_fields( $controller->filter_fields_for_order_confirmation( $controller->get_order_additional_fields_with_values( $order, 'address', 'shipping', 'view' ), array( 'caller' => 'ShippingAddress::render_content', 'order' => $order, 'permission' => $permission, 'attributes' => $attributes, ) ) ); return $address . $phone . $custom; } /** * Extra data passed through from server to client for block. * * @param array $attributes Any attributes that currently are available from the block. * Note, this will be empty in the editor context when the block is * not in the post content on editor load. */ protected function enqueue_data( array $attributes = [] ) { parent::enqueue_data( $attributes ); $this->asset_data_registry->add( 'additionalAddressFields', Package::container()->get( CheckoutFields::class )->get_fields_for_location( 'address' ) ); } }