Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
WooCommerce Cookbook

You're reading from   WooCommerce Cookbook WooCommerce makes it easy to create, design, and manage your own personalized eCommerce store - this WooCommerce tutorial eBook will show you how to get started

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher Packt
ISBN-13 9781784394059
Length 248 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
 Rauland Rauland
Author Profile Icon Rauland
Rauland
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

WooCommerce Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. WooCommerce Basics FREE CHAPTER 2. Adding Products 3. Changing the Product Organization 4. Running a Membership Site 5. Setting Up Shipping Methods 6. Getting Paid 7. Modifying the Checkout Process 8. Managing Orders and Taxes 9. WooCommerce Theming 10. Exploring More with WooCommerce Index

Reordering product tabs


You may not want to remove product tabs entirely. You may only want to rearrange them. That can also be done with a bit of code.

Getting ready

You should know how to find the product tab ID. This is discussed in the first part of the preceding recipe, Removing product tabs.

How to do it…

To reorder product tabs, take a look at the following steps:

  1. Open up your theme's functions.php file, or a custom WooCommerce plugin that you have created, and paste in the following:

    add_filter( 'woocommerce_product_tabs', 'woocommerce_cookbook_reorder_tabs', 98 );
    function woocommerce_cookbook_reorder_tabs( $tabs )
    { 
        return $tabs;
    }
  2. In the woocommerce_cookbook_reorder_tabs function, you'll want to paste in the new order. Add the following code before the return $tabs; statement:

    if( isset( $tabs['reviews']['priority'] ) ){
        $tabs['reviews']['priority'] = 10;
    }
    if( isset( $tabs['description']['priority'] ) ){
        $tabs['description']['priority'] = 20;
    }
    if( isset( $tabs['additional_information...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images