Automattic\WooCommerce\Internal\Admin\Orders

ListTable::display()publicWC 1.0

Render the table.

Method of the class: ListTable{}

No Hooks.

Return

null. Nothing.

Usage

$ListTable = new ListTable();
$ListTable->display();

ListTable::display() code WC 7.1.0

public function display() {
	$title         = esc_html__( 'Orders', 'woocommerce' );
	$add_new       = esc_html__( 'Add Order', 'woocommerce' );
	$new_page_link = $this->page_controller->get_new_page_url();

	// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	echo wp_kses_post(
		"
		<div class='wrap'>
			<h1 class='wp-heading-inline'>{$title}</h1>
			<a href='" . esc_url( $new_page_link ) . "' class='page-title-action'>{$add_new}</a>
			<hr class='wp-header-end'>"
	);

	if ( $this->has_items() || $this->has_filter ) {
		$this->views();

		echo '<form id="wc-orders-filter" method="get" action="' . esc_url( get_admin_url( null, 'admin.php' ) ) . '">';
		$this->print_hidden_form_fields();
		$this->search_box( esc_html__( 'Search orders', 'woocommerce' ), 'orders-search-input' );

		parent::display();
		echo '</form> </div>';
	} else {
		$this->render_blank_state();
	}
}