Add this code to your function.php file, it will create another tab and now you can do what ever, in that callback function.
add_filter( 'woocommerce_product_tabs', 'woo_cat_product_tab' );
function woo_cat_product_tab( $tabs ) {
// Adds the new tab
$tabs['tag_cat_tab'] = array(
'title' => __( 'Tag and Category', 'woocommerce' ),
'priority' => 50,
'callback' => 'woo_cat_product_tab_content'
);
return $tabs;
}
function woo_cat_product_tab_content() {
// The new tab content
global $product;
$id = $product->id;
//Your code
}
for more details check WooCommerce docs .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.