Last active
July 1, 2024 14:20
-
-
Save woogists/b876d4ec508922765258f3d07e03f1f2 to your computer and use it in GitHub Desktop.
[Frontend Snippets][Editing product data tabs] Customize a 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
/** | |
* Customize product data tabs | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_custom_description_tab', 98 ); | |
function woo_custom_description_tab( $tabs ) { | |
$tabs['description']['callback'] = 'woo_custom_description_tab_content'; // Custom description callback | |
return $tabs; | |
} | |
function woo_custom_description_tab_content() { | |
echo '<h2>Custom Description</h2>'; | |
echo '<p>Here\'s a custom description</p>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment