Automattic\WooCommerce\Internal\Admin\Orders\MetaBoxes
CustomMetaBox::render_custom_meta_form()
Helper method to render layout and actual HTML
Method of the class: CustomMetaBox{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->render_custom_meta_form( $metadata_to_list, $order );
- $metadata_to_list(array) (required)
- List of metadata to render.
- $order(\WC_Order) (required)
- Order object.
CustomMetaBox::render_custom_meta_form() CustomMetaBox::render custom meta form code WC 9.5.1
<?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 }