Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
Created July 16, 2022 15:33
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/3583c2c458668e2ecd28db8973fb2ba6 to your computer and use it in GitHub Desktop.
Save damiencarbery/3583c2c458668e2ecd28db8973fb2ba6 to your computer and use it in GitHub Desktop.
Remove tab from Product Data area of Edit Product page
<?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