I added submenu and admin pages on wordpress custom plugin. But it gives an error.
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wstock_variation' not found or invalid function name.
add_menu_page('Elites-StockManager', 'Smart Stock Manager', 'export', 'wstock_api_settings', 'wstock_api_connection_settings', '', 7);
add_submenu_page( 'Elites-StockManager', 'Smart Stock Manager', 'export', 'administrator', 'wstock_variation', 'wstock_variation',8 );