Created
April 5, 2024 16:54
-
-
Save MadCowWeb/d4e6a6164a5896d640ee781a3e74d36a to your computer and use it in GitHub Desktop.
Add a custom tab to the WooCommerce Single Product Page
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 NEATO TEXT CUSTOM TAB | |
add_filter('woocommerce_product_tabs', 'madcow_neato_text_tab'); | |
function madcow_neato_text_tab($tabs) { | |
$tabs['neato_text_tab'] = array( | |
'title' => __('Our Neato Text', 'woocommerce'), | |
'priority' => 5, | |
'callback' => 'madcow_neato_text_tab_content', | |
); | |
return $tabs; | |
} | |
function madcow_neato_text_tab_content() { | |
echo '<div class="custom-tab-text"><h2>This is our custom tab text</h2></div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment