WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Hide WooCommerce Settings in admin panel (9 posts)

  1. draganst
    Member
    Posted 1 year ago #

    Hi,

    is it possible to hide WooCommerce -> Settings sub menu item in admin panel by using remove_submenu_page()?

    Thanks

    http://wordpress.org/extend/plugins/woocommerce/

  2. manuelrossoni
    Member
    Posted 11 months ago #

    Yes,
    this is the code

    remove_submenu_page('woocommerce', 'woocommerce_settings');

  3. despachotres
    Member
    Posted 11 months ago #

    Hi,

    It doesn't work for me. I put it at the end of the functions.php file in my theme's folder, but it doesn't work.

    For example, I've tried to hide the whole woocommerce menu with this:
    remove_menu_page('woocommerce');

    And it works. But your linecode doesn't work for me. Any idea?

    Thanks in advance.

  4. rocboy001
    Member
    Posted 10 months ago #

    despachotres,

    Try

    // Remove Menu Items
    add_action( 'admin_menu', 'remove_menu_pages', 999);
    function remove_menu_pages() {
    $remove_submenu = remove_submenu_page('woocommerce', 'woocommerce_settings');
    }
  5. despachotres
    Member
    Posted 10 months ago #

    Hi rocboy001,

    You're right. This is the code I found myself working a few days ago.

    add_action( 'admin_menu', 'my_remove_menu_pages', 999 );
    function my_remove_menu_pages() {
    remove_submenu_page('woocommerce', 'woocommerce_settings');
    remove_submenu_page('woocommerce', 'woocommerce_status');
    }

    Thanks for your answer.

  6. Lindsay Heydon
    Member
    Posted 10 months ago #

    Hi, exactly what I wanted, tried both versions immediately above and put in at the end of the functions.php file in my theme's folder. Nothing.

    It'd be great as well to make it only available to the Administrator and hide for all others. I think it would follow this format, but any pointers to make the whole thing work would be great.

    // remove for all but administrator
    if ( ! current_user_can('manage_options') ) {
    add_action( 'admin_menu', 'my_remove_menu_pages', 999 );
    function my_remove_menu_pages() {
    remove_submenu_page('woocommerce', 'woocommerce_settings');
    remove_submenu_page('woocommerce', 'woocommerce_status');
    }}

    Lins

  7. Wyrostok
    Member
    Posted 10 months ago #

    You can edit the WP admin navigation however you like (and separately for any WP role) using Admin Menu Editor by Janie Elsts.

    There is a free version in the WP plugin repository, but the paid version adds ability to change manu names and move things from top leve to the submenu -- basically design your own WP admin menus however you want.

    Free version: http://wordpress.org/plugins/admin-menu-editor/
    Pro version: http://adminmenueditor.com/

  8. Lindsay Heydon
    Member
    Posted 10 months ago #

    Thank you very much. I really wanted to do without another plugin though, and above code seems so close... Yet so far. Anybody see what I'm doing wrong? Lins

  9. ScottKennedy
    Member
    Posted 5 months ago #

    Hi Guys!

    I am desperately trying to create a Admin user role for a Web Designer however I do not want this user to have access to Jet Pack or the Woo commerce Orders info.

    Basically sales data (customer name, email, physical address, sales amount etc) is private and I don't want it accessible to a web designer role. However I need to create a user role for the web designer so that they can edit our word press theme and install plugins etc.

    PLEASE help me out here!!

    Thanks a lot

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.