• Resolved webitalsec

    (@webitalsec)


    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)
  • Hi @webitalsec

    Please be informed that we are unable to provide support for customizations per our Support Policy. If you need any assistance with the code and/or customization, please reach out to a web developer or one of our experts.

    You may also be able to find someone willing to volunteer their time and knowledge in the free PHP support forum at PHP Builder or within the Advanced WooCommerce group on Facebook.

    Hopefully, you were able to find a way forward with the issue. I’m going to mark the thread as resolved. Feel free to create a new topic if you need assistance with anything else.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show custom tab in every subcategory product’ is closed to new replies.