Two ways to adjust this.
Add one of the two below codes to your functions.php which suits best to you.
1)
//Adds manage_options capability to shop_manager
add_action( 'admin_init', function() {
$role = get_role( 'shop_manager' );
if( '' != $role ) {
$role->add_cap( 'manage_options' );
}
});
2)
//Changes plugin capability to shop_manager
add_action( 'admin_menu', function(){
if( !function_exists( 'xoo_wl' ) ) return;
remove_menu_page( 'xoo-wl' );
remove_submenu_page( 'xoo-wl','xoo-wl' );
remove_submenu_page( 'xoo-wl','xoo-wl-view-waitlist' );
remove_submenu_page( 'xoo-wl','xoo-wl-email-history' );
remove_submenu_page( 'xoo-wl','xoo-wl-fields' );
add_menu_page(
'Waitlist Settings', //Page Title
'Waitlist', // Menu Titlle
'manage_woocommerce',// capability
'xoo-wl', // Menu Slug
null,
null
);
add_submenu_page(
'xoo-wl',
'Settings',
'Settings',
'manage_woocommerce',
'xoo-wl',
array( xoo_wl_admin_settings(), 'menu_page_callback' )
);
add_submenu_page(
'xoo-wl',
'Users',
'Users',
'manage_woocommerce',
'xoo-wl-view-waitlist',
array( xoo_wl_admin_settings(), 'view_waitlist_page' )
);
add_submenu_page(
'xoo-wl',
'Email History',
'Email History',
'manage_woocommerce',
'xoo-wl-email-history',
array( xoo_wl_admin_settings(), 'view_email_history_page' )
);
add_submenu_page(
'xoo-wl',
'Form Fields',
'Form Fields',
'manage_woocommerce',
'xoo-wl-fields',
array( xoo_wl_admin_settings(), 'admin_fields_page' )
);
}, 15 );
-
This reply was modified 4 years, 5 months ago by xootix.