WC_Admin_List_Table::maybe_render_blank_state()publicWC 1.0

Show blank slate.

{} It's a method of the class: WC_Admin_List_Table{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Admin_List_Table = new WC_Admin_List_Table();
$WC_Admin_List_Table->maybe_render_blank_state( $which );
$which(string) (required)
String which tablenav is being shown.

Code of WC_Admin_List_Table::maybe_render_blank_state() WC 6.7.0

public function maybe_render_blank_state( $which ) {
	global $post_type;

	if ( $post_type === $this->list_table_type && 'bottom' === $which ) {
		$counts = (array) wp_count_posts( $post_type );
		unset( $counts['auto-draft'] );
		$count = array_sum( $counts );

		if ( 0 < $count ) {
			return;
		}

		$this->render_blank_state();

		echo '<style type="text/css">#posts-filter .wp-list-table, #posts-filter .tablenav.top, .tablenav.bottom .actions, .wrap .subsubsub  { display: none; } #posts-filter .tablenav.bottom { height: auto; } </style>';
	}
}