• Resolved iSaumya

    (@isaumya)


    With the recent WooCommerce Update the Marketing Hub section has started to show on the left menu which is really annoying. I just want the useful things to be there and I don’t want to show that menu on my website. Does anyone know how can I disable this Marketing Hub thing so that it doesn’t show up?

Viewing 15 replies - 1 through 15 (of 28 total)
  • Hi Saumya

    Using Code Snippets (set to run in Administration area), a child theme or a custom plugin, you can try the following function:

    function my_remove_menu_pages() {
    	remove_menu_page( 'wc-admin&path=/marketing' );
    }
    add_action( 'admin_menu', 'my_remove_menu_pages', 100 );

    References that might be helpful for similar changes:
    WPBeginner: How to Remove Menu Item in WordPress Admin Panel
    Reddit: How do I hide this Analytics item from the admin menu?

    This just hides cosmetically the marketing link in admin menu but does not disable loading the function. A filter is needed. Anyone has it?

    Thread Starter iSaumya

    (@isaumya)

    Hi @misplon thanks a lot for your reply but I completely agree with @collinsavenue. There should be an option to actually disable it from the WooCommerce core if not needed by the user. Instead of just hiding it. As it is as good as doing a display:none;.
    Doesn’t WooCommerce has a filter to be added in functions.php where I can return false to disable this functionality?

    Hi guys, I agree. I read the pre-release post before my initial reply. Several users echoed similar sentiments, you can read it here. Assuming the information in the comments section is still correct, a setting or filter is not currently being offered.

    Thread Starter iSaumya

    (@isaumya)

    Hey @misplon, I have checked that page before posting here. I also didn’t see any info on how to disable that thing. So, I posted here thinking, I cannot be the only person who is being annoyed by it.

    Thanks, Saumya. I’m sure lots of users would be grateful for the option to disable this section for completed client sites and other situations where it isn’t required. I haven’t had a chance to look into this beyond the menu link removal. If anyone takes a deeper look and has a method to offer, please, let us know. Thanks.

    Ok got it.

    function wc_disable_marketing_hub( $marketing_pages ) {
    	return array();
    }
    
    add_filter( 'woocommerce_marketing_menu_items', 'wc_disable_marketing_hub' );
    Thread Starter iSaumya

    (@isaumya)

    @collinsavenue awesome man. We can also do:

    add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' );

    Special thanks to:

    • This reply was modified 4 years, 6 months ago by iSaumya.

    Thanks, Collin. Thanks, Saumya.

    Even better, thanks Saumya ??

    Plugin Support Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    The above suggestions seem to have worked to disable the option from the wp-admin sidebar. I’ll be marking the thread as resolved now.

    Thanks Collins and Saumya.

    Most WP/WC decisions from the past 2 years have me puzzled and quite anxious, if I’m being honest.

    Very uncool and unprofessional of them to selectively disable comments on their blog (https://woocommerce.wordpress.com/2020/03/31/coming-soon-woocommerce-marketing-hub/), simply because the community disagrees with their approach.

    It’s now apparent beyond any doubt they are heading in a different direction.

    Pity.

    Thread Starter iSaumya

    (@isaumya)

    @avilanx Hopefully comments on this thread will be disabled soon too.

    Excellent work guys, thank you very much for publishing the solution.
    For those who do not know, to be able to add the code that Mr. @collinsavenue published, you have to add it to the functions.php file of the template you are using.
    It will be in the root of your domain, name of the template used, functions.php

    
    // remove Marketing Hub
    
    function wc_disable_marketing_hub( $marketing_pages ) {
    	return array();
    }
    
    add_filter( 'woocommerce_marketing_menu_items', 'wc_disable_marketing_hub' );

    Greetings to all.

    • This reply was modified 4 years, 6 months ago by Tize.

    You can use this plugin to disable:

    • WooCommerce Admin – javascript-driven interface
    • New reports view (Analytics)
    • Notification bar
    • Marketing Hub
    • Connect your store to WooCommerce.com to receive extensions updates and support. message for WooCommerce.com plugins
Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘How to Disable Marketing Hub?’ is closed to new replies.