Forum Replies Created

Viewing 15 posts - 1,681 through 1,695 (of 2,506 total)
  • Author
    Posts
  • in reply to: Search broken for shop_manager #3338
    Vladimir
    Keymaster

    Hi,

    Do you use “admin menu access” add-on and restrict some menu items for this role?
    If ‘Yes’, send me full URL with parameters which was redirected to other menu items after you click search orders button.

    in reply to: New role – admin access #3335
    Vladimir
    Keymaster

    It seems that you use an older version of Woocommerce. If we look at the latest one, this code looks like:

    
    public function prevent_admin_access() {
    		$prevent_access = false;
    
    		if ( 'yes' === get_option( 'woocommerce_lock_down_admin', 'yes' ) && ! is_ajax() && basename( $_SERVER["SCRIPT_FILENAME"] ) !== 'admin-post.php' ) {
    			$has_cap     = false;
    			$access_caps = array( 'edit_posts', 'manage_woocommerce', 'view_admin_dashboard' );
    
    			foreach ( $access_caps as $access_cap ) {
    				if ( current_user_can( $access_cap ) ) {
    					$has_cap = true;
    					break;
    				}
    			}
    
    			if ( ! $has_cap ) {
    				$prevent_access = true;
    			}
    		}
    
    		if ( apply_filters( 'woocommerce_prevent_admin_access', $prevent_access ) ) {
    			wp_safe_redirect( wc_get_page_permalink( 'myaccount' ) );
    			exit;
    		}
    	}
    
    

    You can see that ‘view_admin_dashboard’ was added. This could be the reason why this capability did not work for you. Custom code to add WooCommerce’s ‘woocommerce_prevent_admin_access’ filter is not needed with it. So, in hope that the most of clients use the latest version of WooCommerce, there is no need to add such code to the User Role Editor.

    in reply to: New role – admin access #3333
    Vladimir
    Keymaster

    Strange. Try to exclude redirection to front-end with this filter (add code to the functions.php file of your active theme):

    
    add_filter('woocommerce_prevent_admin_access', '_wc_prevent_admin_access', 10, 1);
     
    function _wc_prevent_admin_access($prevent_admin_access) {
     
        return false;
    }
    

    Will it work?

    in reply to: New role – admin access #3331
    Vladimir
    Keymaster

    Hi,

    I suppose you use WooCommerce.
    Add ‘view_admin_dashboard’ capability to to this role to resolve a redirection to front-end problem. Read this article for more details about it.

    Vladimir
    Keymaster

    I never saw ‘Delete Site” item at the admin menu. So I suppose that it was added by some plugin. Is it right?

    Your assumption about a source of this problem is correct – URE works with admin menu copy from the main site.

    There is no ‘delete_sites’ capability. Try to revoke ‘manage_sites’ capability from the role. May be it will help.

    Vladimir
    Keymaster

    I missed your message somehow…

    Does new added user at subsite has the same role as at the main site?
    Did you block WPML with ‘Admin menu’? Does ‘Admin menu’ have the same settings at subsite or do you see any differences?

    Where do you see ‘Delete site’? I mean does this user has access to the “Network admin -> Sites’ or something else?

    in reply to: Custom Roles missing in new Multisite sub-sites #3325
    Vladimir
    Keymaster

    I sent a version 4.30 to your email. Let me know if you discover any changes critical for you.

    in reply to: Custom Roles missing in new Multisite sub-sites #3322
    Vladimir
    Keymaster

    I don’t support a public resource with older versions. What exact version do you need? I will send it to you.

    Vladimir
    Keymaster

    In general, top admin menu bar menu is blocked automatically if its correspondent main admin menu item was blocked.

    In order to block “Yoas SEO” just at top admin menu bar use this code:

    
    add_action('wp_before_admin_bar_render', 'block_top_wp_seo');
    
    function block_top_wp_seo() {
        global $wp_admin_bar;
        
        if (current_user_can('administrator')) {
            return;
        }
        
        $wp_admin_bar->remove_menu('wpseo-menu');
    
    }
    
    

    Insert into the active theme functions.php file for the single site or setup as a “must use” plugin to aplly it globally to all sites.

    https://codex.wordpress.org/Must_Use_Plugins

    Vladimir
    Keymaster

    Hi,

    Open User Role Editor Pro at the Network Admin. Network Admin->Users->User Role Editor and click “Update Network”, then turn ON “Admin menu access restrictions” checkbox.

    in reply to: Custom Roles missing in new Multisite sub-sites #3314
    Vladimir
    Keymaster

    Thanks for the feedback and issue report.

    I can not repeat with the latest version. I just added a new site (Network Admin -> Sites -> Add New) at my test WordPress multisite installation and got there a full list of roles (including custom) at a new created subsite.

    Try again at a development copy of your site with all other plugins deactivated. May be some conflict takes place. Let me know a result.

    in reply to: Enabling Media Library for Authors & Editors #3312
    Vladimir
    Keymaster

    Try to temporally deactivate all plugins except URE to exclude a conflict with some other plugin. Reactivating plugins back one by one can help to isolate a problem.

    in reply to: Jetpack admin menu #3308
    Vladimir
    Keymaster

    Hi,

    1) Do not grant ‘manage_options’ capability

    2) Try to use this code at functions.php or as a Must Use plugin:

    
    add_filter( 'map_meta_cap', 'my_jetpack_custom_caps', 10, 4 );
    
    function my_jetpack_custom_caps($caps, $cap, $user_id, $args) {
        switch( $cap ) {
            case 'jetpack_admin_page':
            case 'jetpack_connect_user':
                $caps = array( 'manage_options' );
        }
        
        return $caps;
    }
    

    It will replace ‘read’ capability (used at Jetpack by default) with ‘manage_options’.

    in reply to: Visual Composer Role Manager issues #3306
    Vladimir
    Keymaster

    I don’t have a solution on hands. There were no similar reports until today. I will look if it’s possible to activate VC for custom post type programmatically.
    It would be good to contact VC support also.

    Vladimir
    Keymaster

    Correct. Only roles and capabilities are exported currently.

    Export of settings made for roles via additional modules (add-ons) is a subject of the further development. I will realize this with time.

Viewing 15 posts - 1,681 through 1,695 (of 2,506 total)