(Moderator’s note: Original title was “Getting error: You do not have sufficient permissions to access this page. Trying to build custom plugin”)
I’m trying to write my own custom WordPress plugin, but as soon as I click on the menu I get the following error:
You do not have sufficient permissions to access this page.
My plugin is located under:
/wp-content/plugins/wp-e-commerce-group-pricing/wp-e-commerce-group-pricing.php
The code is below, I’m new to WordPress, so maybe I’m doing something wrong:
if ( is_admin() ) {
// Hooks and admin menu setup
add_action('admin_menu', 'add_options_gp');
function add_options_gp() {
add_submenu_page('wpsc-sales-logs','WPEC - Group Pricing','Group Pricing',7,
'wp-e-commerce-group-pricing', 'price_options');
}
function price_options(){
// Page content goes here...
}
}