• Resolved Idaniel

    (@illen)


    Hello,

    I’m trying to remove your plugin from the admin menu. Only for the role shop-manager. I have already remove some items with another code.

    add_action( 'admin_menu', 'remove_menus' );
    function remove_menus(){
    
        // If the current user is not an admin
        if ( !current_user_can('manage_options') ) {
    
            remove_menu_page('plugins.php'); // Plugins
    		remove_menu_page('themes.php'); // Appearance
    		remove_menu_page('users.php'); // Users
    		remove_menu_page('tools.php'); // Tools
    		remove_menu_page('options-general.php'); // Settings
        }
    }
    

    If i add this,

     remove_menu_page('admin.php?page=checkout_form_designer'); // Checkout
    

    It will not work. thanks in advance

    Best regards,

    • This topic was modified 5 years, 1 month ago by Idaniel.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author ThemeHigh

    (@themehigh)

    Please add the below code in your child theme’s functions.php file.

    add_filter('thwcfd_required_capability', 'thcfe_manage_setting_cap');
    
    function thcfe_manage_setting_cap($capability){
    	$capability = 'manage_options';
    	return $capability;
    }

    Hope this will help ??

    Thank you!

    Thread Starter Idaniel

    (@illen)

    Thank you so much! It’s working! ??

    Plugin Author ThemeHigh

    (@themehigh)

    Great!

    This no longer seems to work. I have the paid version is that a different hook?

    Any update about that?
    I want to remove plugin link from admin menu for a client, but I can’t do it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove checkout form from admin by user role’ is closed to new replies.