Support » Plugin: WooCommerce » How to remove “WooCommerce Knowledge Base”

  • Resolved datverse

    (@datverse)


    Hi, in the “Marketing” menu item, Overview and Coupons menu item we have “WooCommerce Knowledge Base”. How can I remove “WooCommerce Knowledge Base”? Is there have any solution / hook / filter / hardcode / etc?
    Thanks

    • This topic was modified 6 months, 2 weeks ago by datverse.
    • This topic was modified 6 months, 2 weeks ago by datverse.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi
    Add to the functions.php file:

    add_action('admin_head', 'ahirwp_custom_style');
    
    function ahirwp_custom_style() {
      echo '<style>
    .components-card.is-size-medium.woocommerce-marketing-knowledgebase-card.woocommerce-marketing-knowledgebase-card__category-marketing.woocommerce-admin-marketing-card.css-1xs3c37-CardUI.e1q7k77g0 {
        display: none;
    }
      </style>';
    }

    Thanks
    Ahir Hemant

    Thread Starter datverse

    (@datverse)

    Hi, thank for your reply. But it just hide the html dom. Do you have any solution remove/stop service? Because it call to another api and link to out admin.
    Thanks

    Try this

    add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' );

    Or this

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

    Or try this

    /**
     * Option - Remove marketing features - basic example to demonstrate usage
     */
    add_filter(
    	'woocommerce_admin_get_feature_config',
    	function ( $features ) {
    		$features['coupons']   = false;
    		$features['marketing'] = false;
    
    		return $features;
    	}
    );
    
    /**
     * Option - Remove marketing features - basic example to demonstrate usage
     */
    add_filter( 'woocommerce_admin_features', 'disable_features' );
    
    function disable_features( $features ) {
    	$marketing = array_search('marketing', $features);
    	unset( $features[$marketing] );
    	//$coupons = array_search('coupons', $features);
    	//unset( $features[$coupons] );
    	//array_values( $features );
    	return $features;
    }

    Thanks
    Ahir Hemant

    Thread Starter datverse

    (@datverse)

    Hi, thank for your help. But with your code we will miss the marketing feature (coupons).
    Thanks

    Plugin Support Mirko P. woo-hc

    (@rainfallnixfig)

    Hi @datverse,

    If the snippets kindly provided by @hemant-ahir do not meet your requirements, we suggest reaching out to a developer from one of the official WooCommerce services at https://woocommerce.com/customizations/ who can help you create a custom-made solution.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to remove “WooCommerce Knowledge Base”’ is closed to new replies.