Created
July 16, 2022 15:33
-
-
Save damiencarbery/3583c2c458668e2ecd28db8973fb2ba6 to your computer and use it in GitHub Desktop.
Remove tab from Product Data area of Edit Product page
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 tab from Product Data area of Edit Product page | |
Plugin URI: https://www.damiencarbery.com/ | |
Description: Remove a tab from the Edit Product page. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
add_filter( 'woocommerce_product_data_tabs', 'dcwd_remove_data_tab', 100 ); | |
function dcwd_remove_data_tab( $tabs ) { | |
if ( array_key_exists( 'marketplace-suggestions', $tabs ) ) { | |
unset( $tabs[ 'marketplace-suggestions' ] ); | |
} | |
//error_log( 'Tabs:'. var_export( $tabs, true ) ); | |
return $tabs; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment