Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
Created July 16, 2022 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damiencarbery/9538eeb1e12e0fe7bff7aa1fd8606c23 to your computer and use it in GitHub Desktop.
Save damiencarbery/9538eeb1e12e0fe7bff7aa1fd8606c23 to your computer and use it in GitHub Desktop.
Remove WooCommerce Settings tab
<?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