Forum Replies Created

Viewing 15 posts - 2,281 through 2,295 (of 2,517 total)
  • Author
    Posts
  • in reply to: Additional Roles #1654
    Vladimir
    Keymaster

    Hi,

    Thanks. I found an issue in URE with your help:
    Other default roles (in addition to the primary role) was assigned to a new registered user for requests from the admin back-end only. Now this feature works for the requests from the front-end user registration forms too.

    Try next update: development version 4.19.1.b2. It should work as expected now.

    in reply to: Editing Restricted pages #1652
    Vladimir
    Keymaster

    In order to edit published page, user should have ‘edit_published_pages’ capability. I added it directly to the user. checkman-test may edit allowed page now.

    in reply to: "Options" does not exist #1651
    Vladimir
    Keymaster

    Hi,

    OK. Thanks for letting me know, that you find an answer yourself.

    in reply to: Editing Restricted pages #1645
    Vladimir
    Keymaster

    Is it possible to look on that data online? Send admin credentials to the [email protected]

    in reply to: Editing Restricted pages #1643
    Vladimir
    Keymaster

    If that post is from other author, then user should have ‘edit_others_posts’ capability to get permission to edit it.

    in reply to: How to display admin bar for some user role #1642
    Vladimir
    Keymaster

    Thanks for the information. It’s a strange effect. Roles editing core was not changed. So I can not repeat and explain it.

    in reply to: How to display admin bar for some user role #1637
    Vladimir
    Keymaster

    Try this variant:

    add_filter('woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1);
     
    function _wc_disable_admin_bar($prevent_admin_access) {
        if ( !( current_user_can('data_entry') || 
                current_user_can('operator') ||
                current_user_can('manager') ) ) {
            return $prevent_admin_access;
        }
        return false;
    }
     
    add_filter('woocommerce_prevent_admin_access', '_wc_prevent_admin_access', 10, 1);
     
    function _wc_prevent_admin_access($prevent_admin_access) {
        if ( !( current_user_can('data_entry') || 
                current_user_can('operator') ||
                current_user_can('manager') ) ) {
            return $prevent_admin_access;
        }
        return false;
    }
    
    in reply to: How to display admin bar for some user role #1635
    Vladimir
    Keymaster

    Good. Thanks for the information.

    You may use one complex expression for all roles, like this one:

    if (!(current_user_can('role1') || current_user_can('role2'))) {
        return ....
    }
    
    in reply to: How to display admin bar for some user role #1630
    Vladimir
    Keymaster

    It seems I found a problem with code. Replace ‘no’ to ‘false’. It should help.

    add_filter('woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1);
     
    function _wc_disable_admin_bar($prevent_admin_access) {
     
        return false;
    }
    
    in reply to: How to display admin bar for some user role #1628
    Vladimir
    Keymaster

    Ok. I will re-test this code myself.

    in reply to: How to display admin bar for some user role #1626
    Vladimir
    Keymaster

    While it worked for me as it is, try to add filter with lower priority value – 9 instead of 10.

    in reply to: How to display admin bar for some user role #1625
    Vladimir
    Keymaster

    Deactivate all plugins except WooCommerce and try. If that will help activate plugins back one by one. May be something else takes an effect.

    in reply to: How to display admin bar for some user role #1623
    Vladimir
    Keymaster

    The logic is correct. If it’s exactly the code you paste – it uses wrong quotes, it should use simple single quote character ' for all string constants.

    in reply to: How to display admin bar for some user role #1621
    Vladimir
    Keymaster

    Try to start from more simple code. Comment role checking. May be something wrong is there. Let’s it work for all users for begin.

    in reply to: How to display admin bar for some user role #1618
    Vladimir
    Keymaster

    Create ‘mu-plugins’ folder. File name does not matter. WordPress executes any .php file it find in this folder.
    https://codex.wordpress.org/Must_Use_Plugins

Viewing 15 posts - 2,281 through 2,295 (of 2,517 total)