Automattic\WooCommerce\Blocks\Domain\Services
CheckoutFieldsFrontend::render_order_other_fields
Renders additional fields on the order details page.
Метод класса: CheckoutFieldsFrontend{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$CheckoutFieldsFrontend = new CheckoutFieldsFrontend(); $CheckoutFieldsFrontend->render_order_other_fields( $order );
- $order(WC_Order) (обязательный)
- Order object.
Код CheckoutFieldsFrontend::render_order_other_fields() CheckoutFieldsFrontend::render order other fields WC 10.3.4
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' ),
);
$context = array(
'caller' => 'CheckoutFieldsFrontend::render_order_other_fields',
'order' => $order,
);
$fields = $this->checkout_fields_controller->filter_fields_for_order_confirmation( $fields, $context );
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>';
}