Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Add the custom tab
- */
- function woo_custom_product_tab( $tabs ) {
- $tabs['my_custom_tab'] = array(
- 'title' => __( 'Custom Tab', 'textdomain' ),
- 'callback' => 'woo_custom_tab_content',
- 'priority' => 50,
- );
- return $tabs;
- }
- add_filter( 'woocommerce_product_tabs', 'woo_custom_product_tab' );
- /**
- * // The custom tab content
- */
- function woo_custom_tab_content( $slug, $tab ) {
- ?><h2><?php echo wp_kses_post( $tab['title'] ); ?></h2>
- <p>Tab Content</p><?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement