This topic has 6 replies, 3 voices, and was last updated 5 years ago ago by John Holden
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.
';
}
Hello,
1) There are 2 custom tabs already available for your products + 1 custom tab individual for every product http://prntscr.com/q5hkyl Is it not enough for you?
2) If you still need more tab then add priority to your filter params, for example
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab', 99 );
Regards
Hi,
Thanks. This’ll give me some flex. I see there are 2 custom tabs available for products & 1 custom tab individual for every product. In the single product builder, there’s no option to add content to the 1 custom tab individual. Only allowance for 2 custom tabs.
Where is the 3rd tab? https://prnt.sc/q947m5
Hi,
Custom Tab Individual you can edit inside single product https://screencast-o-matic.com/watch/cqlXfCUSBj
Regards,
Hung PD
Oh, I see! It’s at the edit product level. That’s helpful. Thank you for clarifying Hung. I don’t know why I didn’t look there!
Cheers.
Hi,
Glad to hear your issue has been resolved.
If you have a quick minute we always appreciate a 5-star rating on our theme!
https://themeforest.net/item/xstore-responsive-woocommerce-theme/reviews/15780546
Your feedback is the motivation to improve our work and services.
Regards,
Hung PD
You must be logged in to reply to this topic.Log in/Sign up