Created
July 16, 2022 15:47
-
-
Save damiencarbery/9538eeb1e12e0fe7bff7aa1fd8606c23 to your computer and use it in GitHub Desktop.
Remove WooCommerce Settings tab
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 | |
/* | |
Plugin Name: Remove WooCommerce Settings tab | |
Plugin URI: https://www.damiencarbery.com/ | |
Description: Remove a tab from the WooCommerce/Settings area. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
add_filter( 'woocommerce_settings_tabs_array', 'dcwd_remove_integration_settings_tab', 100 ); | |
function dcwd_remove_integration_settings_tab( $tabs ) { | |
//error_log( 'Tabs:'. var_export( $tabs, true ) ); | |
if ( array_key_exists( 'integration', $tabs ) ) { | |
unset( $tabs[ 'integration' ] ); | |
} | |
return $tabs; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment