Show custom tab in every subcategory product
-
Hi! I need to display a custom tab in every product listed in the subcategories of the main category called ‘Software Spia’ (https://www.staging2.italsectech.com/categoria/software-spia/)
I’m using this code but it doesn’t work
add_filter( 'woocommerce_product_tabs', 'woo_custom_product_tab' ); function woo_custom_product_tab ( $tabs ) { // Adds the new tab if ( is_product() && has_term( 'Software Spia', 'product_cat' )) { $tabs['avvertenze'] = array( 'title' => __( 'Avvertenze', 'woocommerce' ), 'priority' => 55, 'callback' => 'woo_software_tab_content' ); } return $tabs; } function woo_software_tab_content() { echo '<h4>Ciao</h4>'; }
Any idea on how to solve?
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Show custom tab in every subcategory product’ is closed to new replies.