I am getting "Undefined index: hook_suffix"
error in Wordpress while trying to execute the below. Here $class_name
extends MyRegularClass and MyRegularClass extends WP_List_Table
. Please help.
$tab_name = substr($tab_name,strlen($wpdb->prefix));
if (class_exists($tab_name.'_class')){
$class_name = $tab_name.'_class';
$obj = new $class_name();
} else {
$obj = new MyRegularClass($tab_name);
}
Update: Here I am trying to display a table content in a page(in stead of adding that to a menu) using WP List Table. The issue seems to be due to calling display() before it gets a screen.