Last active
April 22, 2024 04:33
-
-
Save tdmrhn/cf46b18e599a692a2481049e3fb7478f to your computer and use it in GitHub Desktop.
Disable WooCommerce Bloat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_admin_disabled', '__return_true' ); | |
add_filter( 'jetpack_just_in_time_msgs', '__return_false', 20 ); | |
add_filter( 'jetpack_show_promotions', '__return_false', 20 ); | |
add_filter( 'woocommerce_allow_marketplace_suggestions', '__return_false', 999 ); | |
add_filter( 'woocommerce_helper_suppress_admin_notices', '__return_true' ); | |
add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' ); | |
add_filter( 'woocommerce_background_image_regeneration', '__return_false' ); | |
add_filter( 'wp_lazy_loading_enabled', '__return_false' ); | |
add_filter( 'woocommerce_menu_order_count', 'false' ); | |
add_filter( 'woocommerce_enable_nocache_headers', '__return_false' ); | |
add_filter( 'woocommerce_include_processing_order_count_in_menu', '__return_false' ); | |
add_action( 'admin_menu', function() { remove_menu_page( 'skyverge' ); }, 99 ); | |
add_action( 'admin_enqueue_scripts', function() { wp_dequeue_style( 'sv-wordpress-plugin-admin-menus' ); }, 20 ); | |
add_action( 'wp_dashboard_setup', function () { remove_meta_box( 'e-dashboard-overview', 'dashboard', 'normal'); }, 40); | |
add_action( 'admin_menu', function () { remove_submenu_page( 'woocommerce', 'wc-addons'); }, 999 ); | |
add_filter( 'woocommerce_admin_features', function ( $features ) { | |
$marketing = array_search('marketing', $features); | |
unset( $features[$marketing] ); | |
return $features; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment