/marketing-hub-disable.php Secret
Last active
August 6, 2022 09:15
Revisions
-
jconroy revised this gist
Jul 15, 2020 . 1 changed file with 14 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,20 @@ */ /** * 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' ); -
jconroy revised this gist
Jul 9, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function disable_features( $features ) { } /** * Add/edit additional marketing hub menu item/s */ //add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' ); -
jconroy revised this gist
Jul 9, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function disable_features( $features ) { } /** * Add/edit marketing hub menu item/s */ //add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' ); -
jconroy revised this gist
Jul 9, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ */ /** * Remove marketing features - basic example to demonstrate usage */ add_filter( 'woocommerce_admin_features', 'disable_features' ); -
jconroy revised this gist
Jul 9, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ function disable_features( $features ) { /** * Remove marketing hub menu item/s */ //add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' ); /** * Remove wc-admin -
jconroy revised this gist
Jul 9, 2020 . 1 changed file with 14 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,20 @@ * Plugin Name: Disable the WooCommerce Marketing Hub */ /** * Remove marketing features */ 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; } /** * Remove marketing hub menu item/s */ -
jconroy revised this gist
Apr 23, 2020 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,10 +4,11 @@ */ /** * Remove marketing hub menu item/s */ add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' ); /** * Remove wc-admin */ //add_filter( 'woocommerce_admin_disabled', '__return_true' ); -
jconroy created this gist
Apr 1, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ <?php /** * Plugin Name: Disable the WooCommerce Marketing Hub */ /** * Remove menu item/s */ function poc_disable_marketing_hub( $marketing_pages ) { return array(); } add_filter( 'woocommerce_marketing_menu_items', 'poc_disable_marketing_hub' );