Created
February 28, 2015 15:01
-
-
Save yojance/c0c5c2019da98c991fed to your computer and use it in GitHub Desktop.
Adding A New Product Data 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 | |
/* Register New Tab */ | |
add_filter( 'woocommerce_product_data_tabs', 'register_internal_comments_data_tab' ); | |
function register_internal_comments_data_tab( $data_tabs ) { | |
$internal_comments = array( | |
'internal_comments' => array( | |
'label' => __('Internal Comments', 'spyr'), | |
'target' => 'internal_comments_data', | |
'class' => array(), | |
), | |
); | |
// Return default tabs plus our new one | |
return array_merge( $data_tabs, $internal_comments ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment