SB Add WooCommerce Tabs – WordPress Plugin

March 30, 2013 | Ecommerce, PHP, Plugins, Plugins, Time Savers, WooCommerce, Wordpress | 54 comments

You have been asking for this so I wrote it for you. This plugin is a very simply way of adding a WYSIWYG controlled tab to your WooCommerce products. It does the legwork for you and all you need to do it edit 1 line in the plugin file to set the tab name and to determine how many tabs you want. I have even provided examples for you in the code.

I might eventually add a little admin system to this but for now you get the following:

$sb_awt_tabs = array(
    'New Tab 1'=>50
    , 'New Tab 2'=>60
    // , 'New Tab 3'=>50
    // , 'New Tab 4'=>50
);

You will note two tabs are uncommented and two are commented. Simply change the part at the start for the name and the second part is the priority. Very simply put the higher the number the further right in your tab list it will be. If you need more than 4 tabs then simply duplicate a line as normal.

Once you activate the plugin you will notice a new Tiny MCE editor at the bottom of each edit products page. Simply fill it in if you want the tab to show or leave it blank to hide the tab. Nice and easy!

I should add that if you include any shortcodes in the tab editor then they will be read also.. ie a YouTube video or something.

Download


SB Add WooCommerce Tabs (1836 downloads)

Note

This plugin only works with WooCommerce Version 2 or newer. I have already written another post last year to show you how to add new tabs to older versions.

A Donate Button!

54 Comments

  1. Richard

    Just installed it, works perfectly.

    Thanks a lot. Easy to configure, code is understandable, and for free.

    Thanks again 🙂

    Reply
  2. Prakash

    Sean, I just installed this plugin and it works seamlessly. Couldn’t expect more!

    Awesome! and thanks for developing it. Why don’t you also list it at WordPress plugin repository. I am sure more people will benefit from it.

    Reply
  3. Weston

    Sean, thank you for this plugin. It’s what I needed.

    However, it does not retain my formatting tags, like my paragraph tags. Is there a way to fix this?

    Reply
    • Alex

      Quick and Dirty:
      line 83, change from echo do_shortcode($content); to echo do_shortcode(nl2br($content));

      … waiting for a better solution…

      Reply
      • Alex

        Indeed, just doing little research it could be better to apply wpautop() instead of nl2br() to $content.

        I’ve tried to add filter in order to let the plugin code as is, but it didn’t worked for me:
        add_filter(‘sb_awt_tab_content’, ‘wpautop’);

        (Sorry for my english)

        Reply
  4. Jennifer

    Thank you so much for this!

    Reply
  5. Mitchi

    Nice Job!
    Thanks very much it helped me.
    Mitchi

    Reply

Leave a Reply

Divi United

About this site and Sean Barton

Picture of Sean
Sean Barton is a Freelance PHP Website Developer in Crewe, Cheshire. He is a Wordpress and CMS/Framework specialist.
This site was set up in 2008 as a tutorial and scripting resource for the PHP language and Wordpress.
Find out more about Sean on the About Me page or use the Hire Me page to get in touch. For more information about Sean's work take a look at the Portfolio

Our Services

  • Wordpress plugin/theme development
  • Divi specialist
  • Ecommerce (Woocommerce, WPSC, Shopify, Magento)
  • PSD to Wordpress theme conversion (Responsive)
  • Website design work (Banners, Logos, Full Site, etc)
  • Website analysis (security, usability, SEO)
  • API Integrations (InfusionSoft, SalesForce, Ontraport, Customer Thermometer, etc..)
  • Wordpress consultancy & expert advice
  • Crisis support
  • Website hosting

The main services offered are Wordpress based although we do a great deal of technical programming for bespoke systems. From troubleshooting, extending frameworks, finding bugs to writing them from scratch.

Find out more by looking through our past projects or get a quote.

Be the first to hear about new products/updates!

This is a mailing list for those people interested in being told when we release a new product (Divi plugin or Theme).

We shall also use this list to let you know about product updates and releases.

You have Successfully Subscribed!