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.

Method of the class: WC_Admin_List_Table{}

No Hooks.


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


$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.

WC_Admin_List_Table::disable_view_mode() code WC 8.3.0

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