Adding additional tabs in product details page
-
I added an additional tab (ingredients) and it worked great. However, I need to add another tab so I just duplicated this code but that didn’t work. Any Suggestions? Thank you!
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' ); function woo_new_product_tab( $tabs ) { // Adds the new tab $tabs['test_tab'] = array( 'title' => __( 'Ingredients', 'woocommerce' ), 'priority' => 50, 'callback' => 'woo_new_product_tab_content' ); return $tabs; } function woo_new_product_tab_content() { // The new tab content echo '<h2>Product Ingredients</h2>'; }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Adding additional tabs in product details page’ is closed to new replies.