Skip to content

Commit

Permalink
Disable WC features
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Jul 12, 2024
1 parent 70801c9 commit acc24a1
Showing 1 changed file with 39 additions and 7 deletions.
46 changes: 39 additions & 7 deletions mu-plugins/woocommerce.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,47 @@
<?php

/*
* Plugin Name: Remove WooCommerce guided tour videos
* Plugin Name: Remove WooCommerce features
* Plugin URI: https://github.com/szepeviktor/wordpress-website-lifecycle
*/

add_action(
'current_screen',
static function () {
get_current_screen()->remove_help_tab('woocommerce_guided_tour_tab');
add_filter(
'woocommerce_admin_features',
static function ($features) {
// From includes/react-admin/feature-config.php
$disabled_features = [
'activity-panels',
'analytics',
'product-block-editor',
'coupons',
'core-profiler',
'customize-store',
'customer-effort-score-tracks',
'import-products-task',
'experimental-fashion-sample-products',
'shipping-smart-defaults',
'shipping-setting-tour',
'homescreen',
'marketing',
'mobile-app-banner',
'navigation',
'onboarding',
'onboarding-tasks',
'product-custom-fields',
'remote-inbox-notifications',
'remote-free-extensions',
'payment-gateway-suggestions',
'shipping-label-banner',
'subscriptions',
'store-alerts',
'transient-notices',
'woo-mobile-welcome',
'wc-pay-promotion',
'wc-pay-welcome-page',
'launch-your-store',
];
return array_diff($features, $disabled_features);
},
51,
0
0,
1
);

0 comments on commit acc24a1

Please sign in to comment.