Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2. /**
  3. * Add the custom tab
  4. */
  5. function woo_custom_product_tab( $tabs ) {
  6. $tabs['my_custom_tab'] = array(
  7. 'title' => __( 'Custom Tab', 'textdomain' ),
  8. 'callback' => 'woo_custom_tab_content',
  9. 'priority' => 50,
  10. );
  11. return $tabs;
  12. }
  13. add_filter( 'woocommerce_product_tabs', 'woo_custom_product_tab' );
  14. /**
  15. * // The custom tab content
  16. */
  17. function woo_custom_tab_content( $slug, $tab ) {
  18. ?><h2><?php echo wp_kses_post( $tab['title'] ); ?></h2>
  19. <p>Tab Content</p><?php
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement