Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // 1) Add woocommerce tab
- add_filter( 'woocommerce_product_tabs', 'woo_nutrition_tab' );
- function woo_nutrition_tab( $tabs ) {
- // Adds the new tab
- $tabs['nutrition_tab'] = array(
- 'title' => __( 'Nutrition Tab', 'woonutrition' ),
- 'priority' => 50,
- 'callback' => 'woo_nutrition_tab_content'
- );
- return $tabs;
- }
- // 2) Add woocommerce Nutrition Tab Content
- function woo_nutrition_tab_content() {
- return '<div class="my-tab">My Tab Content</div>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement