Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterYes, I confirm this.
Vladimir
KeymasterHi,
Currently there is not suitable hook for this purpose. I will add a couple for the next update – approximately the begin of March, 2020.
Vladimir
KeymasterHi Luke,
I confirm: v. 4.55 includes large changes in JavaScript part.
Vladimir
KeymasterErik,
I found the reason :). Login under the test user, go to “Appearance->Menus” and click on the “Screen Options” at the top right corner. Turn ON checkboxes which you wish to see at the page. Menu items realized as meta boxes, which you can hide/show and some of theme are hidden by default.
Vladimir
KeymasterErik,
Interesting thing I discovered. When I logged in under provided test user with the same admin privileges I see the limited list of options under “Appearance->Add menu”, exactly as you showed for the limited role.
It seems the list of options does not depend from user permissions as users with the same ‘administrator’ role sees the different list of options (post types).I will make some tests with Events Calendar Pro at my own test site.
Vladimir
KeymasterHi,
I don’t have access to the Modern Tribe’s Event Calendar Pro for testing. I referenced WooCommerce “Products” as it’s a similar custom post type, which I took for a quick testing.
You may share MTEC Pro plugin .zip with support [at-sign] role-editor.com via Google Drive or DropBox. I will repeat the test with MTEC instead of WooCommerce then.Vladimir
KeymasterHi Luke,
Look at the browser JavaScript console (Ctrl+Shift+I for Google Chrome) if there any JavaScript error messages.
Vladimir
KeymasterYou may redirect membership_manager users after login using another plugin, like this one.
Vladimir
KeymasterHi,
My test showed that the list of groups (post types) at the “Add menu items” section does not depend from the ability of user to edit those items. My test user does not have capabilities to edit Woocommerce products but he see “Products” group at the mentioned section.
I may just suppose that another plugin may be involved. Did you try to deactivate all plugins and re-test? If that will change a picture, activating plugins back one by one you can isolate a reason.
Vladimir
KeymasterHi Jay,
Thanks for the additional information. I made a quick test and was redirected as expected.
So I can not repeat the issue with 2 plugins only URE Pro and WooCommerce and 2020 theme.Is it possible to get admin access to the test/stage copy where I can reproduce this? If Yes, send credentials to support [at-sign] role-editor.com
Vladimir
KeymasterYes, I missed a closing bracket at the line 8. Valid code is:
add_filter( 'woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1 ); function _wc_disable_admin_bar( $disable ) { $user = wp_get_current_user(); if ( !is_a( $user, 'WP_User') || !is_array( $user->roles ) ) { return $disable; } if ( !in_array( 'membership_manager', $user->roles ) ) { return $disable; } return false; }If filter does not help I suppose that another plugin may have own setting for showing admin bar at the front-end.
Try to add ‘manage_woocommerce’ to membership_manager role to exclude WooCommerce. Will it help? If it did not help, try to deactivate all plugins and re-test activating them back one by one, to isolate a source of the problem.
Vladimir
KeymasterHi,
Show screenshot with example of Content View Restrictions settings for product page, which does not work.
Vladimir
KeymasterCode for membership_manager role only will be looked this way:
add_filter( 'woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1 ); function _wc_disable_admin_bar( $disable ) { $user = wp_get_current_user(); if ( !is_a( $user, 'WP_User') || !is_array( $user->roles ) ) { return $disable; } if ( !in_array( 'membership_manager', $user->roles ) ) { return $disable; } return false; }Vladimir
KeymasterRead this article. Look if it’s related to your task and code below may help you:
add_filter('woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1); function _wc_disable_admin_bar($prevent_admin_access) { return false; }Vladimir
KeymasterIf you have other plugins which use ‘manage_options’ you may block admin menu items created by those plugins using Admin menu blocking add-on.
-
AuthorPosts