WC_Admin_List_Table::disable_view_mode()publicWC 1.0

Removes this type from list of post types that support "View Mode" switching. View mode is seen on posts where you can switch between list or excerpt. Our post types don't support it, so we want to hide the useless UI from the screen options tab.

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

No Hooks.

Return

Array. Array of post types supporting view mode, without this type.

Usage

$WC_Admin_List_Table = new WC_Admin_List_Table();
$WC_Admin_List_Table->disable_view_mode( $post_types );
$post_types(array) (required)
Array of post types supporting view mode.

Code of WC_Admin_List_Table::disable_view_mode() WC 6.7.0

public function disable_view_mode( $post_types ) {
	unset( $post_types[ $this->list_table_type ] );
	return $post_types;
}