Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Add a custom tab to WooCommerce products
- *
- * @param (array) $tabs - Registered tabs
- * @return (array) $tabs - Updated array of tabs
- *
- * @author UltimateWoo <www.ultimatewoo.com>
- */
- function uw_custom_product_tab( $tabs ) {
- global $post;
- $tabs['uw_custom_product_tab'] = array(
- 'title' => 'Test Tab',
- 'priority' => 50,
- 'callback' => function( $key, $tab ) {
- echo "Our custom test tab's content, added via PHP!";
- }
- );
- return $tabs;
- }
- add_action( 'woocommerce_product_tabs', 'uw_custom_product_tab' );
Add Comment
Please, Sign In to add comment