Skip to content

Instantly share code, notes, and snippets.

@yojance
Created February 28, 2015 15:01
Show Gist options
  • Save yojance/c0c5c2019da98c991fed to your computer and use it in GitHub Desktop.
Save yojance/c0c5c2019da98c991fed to your computer and use it in GitHub Desktop.
Adding A New Product Data Tab
<?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