Categories
CMS Mastering Development Wordpress

Woocommerce blocking custom role to access admin_bar/admin_access

Developed a plugin which will add_role() called backend_user during plugin activation. In the plugin I had designed a controller which enables access to certain pages of ‘my custom plugin menu’ for backend_user. So whenever the user(role:backend_user) logins in via wp-admin they can see admin bar and access the ‘My custom plugin’ menus, this user is […]

Categories
CMS Mastering Development Wordpress

Enable a role named ‘backend_user’ to access my plugin pages

I am new to plugin development and I am fairly okay with development by following all the plugin development best practices set by WordPress Codex. Following code describes on how Role: Administrator of WordPress gains access to the plugin. Administrator access to plugin in settings: SettingsApi.php public function register() { if ( ! empty($this->admin_pages) || […]