WooCommerce 2.0 Multiple Custom Product Tabs

Now that WooCommerce 2.0 is in the wild I figured it was finally time to update my original post about adding multiple tabs to WooCommerce Single Product pages.

Please note that I would never argue that my code is the most elegant and/or best way to achieve the end result. There are several premium plugins available that do a much better job of managing multiple tabs. Definitely consider using Justin Stern’s WooCommerce Tab Manager for more advanced options.

Nonetheless, this solution is free and has been tested as a working solution. Again, if you have suggestions to improve my code I’m all ears. Definitely ping me via the comment section or via e-mail. I’m considering posting my code to GitHub as well. I’ll post the link here once I do.

The goal of the original code was to enable support for multiple product tabs. I have simply updated the original code to be compatible with WooCommerce 2.0. All of your data will remain intact after upgrading the original code. If you’re looking for a solution that’s compatible with an older version of WooCommerce please see my original post.

Each block of code will enable a new tab. Again, you’ll need to save each block of code as a separate file and then call each file via your functions.php file.

How to create multiple tabs?

  • Create two files in your theme directory (I created mine in a separate folder named “inc”)
    - custom-woospecs.php
    - custom-woodownloads.php
  • Call each file from your functions.php file with the code below. Place the code at the top to make it easy after your php declaration.
    require_once get_template_directory() . '/inc/custom-woospecs.php'; // woocommerce custom tabs
    require_once get_template_directory() . '/inc/custom-woodownloads.php'; // woocommerce custom tab 2
    

WooCommerce 2.0 Compatible Tab Code

Honoring America's Heroes BadgeIf you enjoyed this post shoot me back a link or even better donate $10 to the
Navy SEAL Foundation. Cheers!