Automattic\WooCommerce\Internal\Admin\Orders\MetaBoxes

CustomMetaBox::render_custom_meta_form()privateWC 1.0

Helper method to render layout and actual HTML

Метод класса: CustomMetaBox{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// private - только в коде основоного (родительского) класса
$result = $this->render_custom_meta_form( $metadata_to_list, $order );
$metadata_to_list(массив) (обязательный)
List of metadata to render.
$order(\WC_Order) (обязательный)
Order object.

Код CustomMetaBox::render_custom_meta_form() WC 8.7.0

<?php
private function render_custom_meta_form( array $metadata_to_list, \WC_Order $order ) {
	?>
	<div id="postcustomstuff">
		<div id="ajax-response"></div>
		<?php
		list_meta( $metadata_to_list );
		$this->render_meta_form( $order );
		?>
	</div>
	<p>
		<?php
		printf(
			/* translators: 1: opening documentation tag 2: closing documentation tag. */
			esc_html( __( 'Custom fields can be used to add extra metadata to an order that you can %1$suse in your theme%2$s.', 'woocommerce' ) ),
			'<a href="' . esc_attr__( 'https://wordpress.org/support/article/custom-fields/', 'woocommerce' ) . '">',
			'</a>'
		);
		?>
	</p>
	<?php
}