Adding a custom tab via https://docs.woocommerce.com/document/editing-product-data-tabs/ doesn’t seem be working. Is there another filter that should be used? I am using the Single Product Builder.
I’ll be altering to show/hide a tab based on product category.
/*** Add a custom product data tab */
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
function woo_new_product_tab( $tabs ) {
// Adds the new tab
$tabs['test_tab'] = array(
'title' => __( 'New Product Tab', 'woocommerce' ),
'priority' => 50,
'callback' => 'woo_new_product_tab_content'
);
return $tabs;
}
function woo_new_product_tab_content() {
// The new tab content
echo '<h2>New Product Tab</h2>';
echo 'Here\'s your new product tab.
';
}