Created
May 20, 2021 23:06
-
-
Save racmanuel/ce5b07fb834bb4904ed38d6fc4332a4c to your computer and use it in GitHub Desktop.
Create a new tab in the single product page - Woocommerce
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
<?php | |
/*Create a new tab in the single product page for the clients view the information*/ | |
function woo_new_product_tab($tabs) | |
{ | |
// Adds the new tab | |
$tabs['aditional_information'] = array( | |
'title' => __('Aditional Information', 'woocommerce'), | |
'priority' => 10, | |
'callback' => 'HERE YOUR FUNCTION TO ADD THE DATA FIELDS', | |
); | |
return $tabs; | |
} | |
add_filter('woocommerce_product_tabs', 'woo_new_product_tab'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment