Last active
May 31, 2021 13:06
-
-
Save woogists/c15230393ba094d9da33a19a02e20a15 to your computer and use it in GitHub Desktop.
[Frontend Snippets][Editing product data tabs] Add a custom tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add a custom product data tab | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' ); | |
function woo_new_product_tab( $tabs ) { | |
// Adds the new tab | |
$tabs['test_tab'] = array( | |
'title' => __( 'New Product Tab', 'woocommerce' ), | |
'priority' => 50, | |
'callback' => 'woo_new_product_tab_content' | |
); | |
return $tabs; | |
} | |
function woo_new_product_tab_content() { | |
// The new tab content | |
echo '<h2>New Product Tab</h2>'; | |
echo '<p>Here\'s your new product tab.</p>'; | |
} |
i found a a plugin that does exaclt what i want!
all the time wasted... for $24!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No sorry, no solution found.. I changed theme