• Resolved rivenverse

    (@rivenverse)


    Hi.

    I need to hide Custom Product Tabs for WooCommerce from left menu in dashboard for specific user Role, also I need to restrict access to it, so users will not be able to create new tabs, or edit existing tabs, except adding existing tabs when they edit product.

    I have User Role Editor, but it seems there is no needed flags.

    • This topic was modified 4 years, 6 months ago by rivenverse.
    • This topic was modified 4 years, 6 months ago by rivenverse.
    • This topic was modified 4 years, 6 months ago by rivenverse.
    • This topic was modified 4 years, 6 months ago by rivenverse.
Viewing 1 replies (of 1 total)
  • Hey @rivenverse,

    The capablity that we use to add the menu is publish_products but you can change it with a filter:

    
    add_filter( 'yikes-woo-settings-menu-capability', 'yikes_change_woo_cap' );
    
    function yikes_change_woo_cap( $cap ) {
        return 'manage_options';
    }
    

    This code would go in your child theme and would make it so that only Admins could see. You could change manage_options to any of the WordPress or WooCommerce caps.

    Cheers,
    Freddie

    • This reply was modified 4 years, 6 months ago by Freddie. Reason: typo
Viewing 1 replies (of 1 total)
  • The topic ‘Role editor? How to hide it from left menu?’ is closed to new replies.